Начинающий
- Статус
- Оффлайн
- Регистрация
- 2 Мар 2024
- Сообщения
- 230
- Реакции
- 1
- Выберите загрузчик игры
- Vanilla
- OptiFine
Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:
- бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
- маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
- приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
- обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.
Спасибо!
шалом югейм решил от нехуй делать сделать свою пасту для хвх, мне довольно часто в личку долбятся с прозьбой дать худ ну так вот я его сливаю есть 2 версии с eating indecator и без
сс прикрепил вдохновлялся таргет худом из веги (noad)
ВАЖНО операцию на глаза не оплачиваю с этим вопросом оброщайтесь к 2 автору этого таргет худа а имено чат ЛГБТ
с
бля чото с юг пишет что 40000 символов но всеволишь 400 строк
так вот туториал как его кастрировать что пропал индекатор
удалаете
сс прикрепил вдохновлялся таргет худом из веги (noad)
ВАЖНО операцию на глаза не оплачиваю с этим вопросом оброщайтесь к 2 автору этого таргет худа а имено чат ЛГБТ
с
с индекатором:
package eva.ware.ui.clienthud.impl;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import eva.ware.Evaware;
import eva.ware.events.AttackEvent;
import eva.ware.events.EventRender2D;
import eva.ware.ui.clienthud.updater.ElementRenderer;
import eva.ware.manager.Theme;
import eva.ware.utils.animations.AnimationUtility;
import eva.ware.utils.animations.Direction;
import eva.ware.utils.animations.impl.EaseBackIn;
import eva.ware.manager.drag.Dragging;
import eva.ware.utils.client.ClientUtility;
import eva.ware.utils.math.MathUtility;
import eva.ware.utils.math.TimerUtility;
import eva.ware.utils.math.Vector4i;
import eva.ware.utils.render.color.ColorUtility;
import eva.ware.utils.render.font.Fonts;
import eva.ware.utils.render.other.Scissor;
import eva.ware.utils.render.other.Stencil;
import eva.ware.utils.render.engine2d.RenderUtility;
import eva.ware.utils.render.engine2d.RectUtility;
import eva.ware.utils.text.font.ClientFonts;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicReference;
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetHud implements ElementRenderer {
final TimerUtility timerUtility = new TimerUtility();
@Getter
final Dragging drag;
@Getter
LivingEntity entity = null;
boolean allow;
final AnimationUtility animation = new EaseBackIn(400, 1, 1);
float healthAnimation = 0.0f;
float absorptionAnimation = 0.0f;
float width = 168 / 1.5f;
float height = 55 / 1.5f;
float lastHealth = 0.0f;
float lastAbsorption = 0.0f;
float eatingAnimation = 0.0f;
boolean isEating = false;
ItemStack currentEatingItem = null;
long eatingStartTime = 0;
int headSize = 25;
float spacing = 5;
// Gold yellow color for absorption health
private static final int ABSORPTION_COLOR = ColorUtility.rgb(255, 215, 0);
// List to store health bar particles
final List<HealthParticle> healthParticles = new ArrayList<>();
public void onAttack(AttackEvent e) {
if (e.entity == mc.player) {
return;
}
if (entity == null) {
return;
}
if (e.entity instanceof LivingEntity) {
for (int i = 0; i < 7; ++i) {
Evaware.getInst().getModuleManager().getHud().getParticles().add(new TargetHud.HeadParticle(new Vector3d(drag.getX() + spacing + headSize / 2f, drag.getY() + spacing + headSize / 2f, 0.0)));
}
}
}
private boolean isEntityEating(LivingEntity entity) {
if (entity == null) return false;
return entity.getActiveItemStack() != null && !entity.getActiveItemStack().isEmpty();
}
private float getEatingProgress(LivingEntity entity) {
if (!isEntityEating(entity)) return 0.0f;
ItemStack activeItem = entity.getActiveItemStack();
if (activeItem.isEmpty()) return 0.0f;
int maxUseDuration = activeItem.getUseDuration();
int timeLeft = entity.getItemInUseCount();
if (maxUseDuration <= 0) return 0.0f;
return Math.min(1.0f, (float)(maxUseDuration - timeLeft) / (float)maxUseDuration);
}
private void drawEatingIndicator(MatrixStack ms, float posX, float posY) {
if (entity == null) return;
boolean entityEating = isEntityEating(entity);
// Update eating state
if (entityEating && !isEating) {
isEating = true;
currentEatingItem = entity.getActiveItemStack().copy();
eatingStartTime = System.currentTimeMillis();
} else if (!entityEating && isEating) {
isEating = false;
currentEatingItem = null;
}
// Animate eating progress
float targetProgress = entityEating ? getEatingProgress(entity) : 0.0f;
eatingAnimation = MathUtility.fast(eatingAnimation, targetProgress, 8);
// Don't draw if no eating activity
if (eatingAnimation <= 0.01f && currentEatingItem == null) return;
// Calculate alpha for fade in/out effect
float alpha = isEating ?
Math.min(1.0f, (System.currentTimeMillis() - eatingStartTime) / 200.0f) :
Math.max(0.0f, 1.0f - ((System.currentTimeMillis() - (eatingStartTime + 1000)) / 300.0f));
if (alpha <= 0.01f) return;
// Calculate position for eating indicator square (to the right of main HUD)
float squareSize = height; // Same height as main HUD
float eatingSquareX = posX + width + spacing;
float eatingSquareY = posY;
// Draw background square with shadow
int bgColor = ColorUtility.setAlpha(Theme.mainRectColor, (int)(255 * alpha));
int shadowColor = ColorUtility.setAlpha(Theme.rectColor, (int)(80 * alpha));
RenderUtility.drawStyledShadowRectWithChange(ms, eatingSquareX, eatingSquareY, squareSize, squareSize);
// Circle position inside the square
float circleRadius = 12;
float circleX = eatingSquareX + squareSize / 2;
float circleY = eatingSquareY + squareSize / 2;
// Background circle (dark)
int circleBgColor = ColorUtility.setAlpha(ColorUtility.rgb(32, 32, 32), (int)(255 * alpha));
RenderUtility.drawCircleWithFill(circleX, circleY, 0, 360, circleRadius, 3.5f, false, circleBgColor);
// Progress circle using theme colors
if (eatingAnimation > 0.01f) {
float eatingAngle = 360 * eatingAnimation;
int progressColor = ColorUtility.setAlpha(Theme.rectColor, (int)(255 * alpha));
RenderUtility.drawCircleWithFill(circleX, circleY, 0, eatingAngle, circleRadius, 3.5f, false, progressColor);
}
// Shadow for eating circle using theme colors
int circleShadowColor = ColorUtility.setAlpha(Theme.rectColor, (int)(80 * alpha));
RenderUtility.drawShadow(circleX - circleRadius, circleY - circleRadius,
circleRadius * 2, circleRadius * 2, 8, circleShadowColor,
ColorUtility.setAlpha(Theme.mainRectColor, (int)(80 * alpha)));
// Draw eating item in center of circle
if (currentEatingItem != null) {
GlStateManager.pushMatrix();
GlStateManager.color4f(1.0f, 1.0f, 1.0f, alpha);
float itemScale = 0.8f;
float itemX = circleX - 8 * itemScale;
float itemY = circleY - 8 * itemScale;
RenderSystem.pushMatrix();
RenderSystem.translatef(itemX, itemY, 0);
RenderSystem.scalef(itemScale, itemScale, itemScale);
mc.getItemRenderer().renderItemAndEffectIntoGUI(currentEatingItem, 0, 0);
RenderSystem.popMatrix();
GlStateManager.popMatrix();
}
}
private void spawnEatingParticles(float posX, float posY, boolean isStarting) {
// Calculate position for eating indicator square
float squareSize = height;
float eatingSquareX = posX + width + spacing;
float eatingSquareY = posY;
// Circle position inside the square
float circleRadius = 12;
float circleX = eatingSquareX + squareSize / 2;
float circleY = eatingSquareY + squareSize / 2;
int particleCount = isStarting ? 6 : 4;
int color = isStarting ? Theme.rectColor : ColorUtility.rgb(100, 255, 100);
for (int i = 0; i < particleCount; i++) {
float randomAngle = ThreadLocalRandom.current().nextFloat() * 360f;
float radians = (float) Math.toRadians(randomAngle);
float particleX = circleX + (float) Math.cos(radians) * circleRadius;
float particleY = circleY + (float) Math.sin(radians) * circleRadius;
float velX = (float) Math.cos(radians) * (isStarting ? 1.8f : 1.2f);
float velY = (float) Math.sin(radians) * (isStarting ? 1.8f : 1.2f);
velX += ThreadLocalRandom.current().nextFloat() * 0.6f - 0.3f;
velY += ThreadLocalRandom.current().nextFloat() * 0.6f - 0.3f;
healthParticles.add(new HealthParticle(
particleX, particleY, velX, velY,
ThreadLocalRandom.current().nextFloat() * 1.2f + 0.8f,
color, !isStarting
));
}
}
@Override
public void render(EventRender2D eventRender2D) {
MatrixStack ms = eventRender2D.getMatrixStack();
entity = getTarget(entity);
float size;
boolean hitAuraIsState = Evaware.getInst().getModuleManager().getHitAura().isEnabled();
boolean out = !allow;
animation.setDuration(out ? 300 : 200);
animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
if (animation.getOutput() == 0.0f) {
entity = null;
}
if (entity != null) {
String name = entity.getName().getString();
float posX = drag.getX();
float posY = drag.getY();
drag.setWidth(width);
drag.setHeight(height);
Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));
float hp = entity.getHealth();
float maxHp = entity.getMaxHealth();
float absorption = entity.getAbsorptionAmount();
String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();
if (entity instanceof PlayerEntity) {
if (ClientUtility.isConnectedToServer("funtime") && (header.contains("анархия") || header.contains("гриферский"))) {
hp = score.getScorePoints();
maxHp = 20;
}
}
// Check for health changes to spawn particles
if (Math.abs(lastHealth - hp) > 0.5f) {
spawnHealthChangeParticles(posX, posY, hp < lastHealth);
lastHealth = hp;
}
// Check for absorption changes to spawn particles
if (Math.abs(lastAbsorption - absorption) > 0.5f) {
spawnAbsorptionParticles(posX, posY);
lastAbsorption = absorption;
}
healthAnimation = MathUtility.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
absorptionAnimation = MathUtility.fast(absorptionAnimation, MathHelper.clamp(absorption / maxHp, 0, 1), 10);
float animationValue = (float) animation.getOutput();
float halfAnimationValueRest = (1 - animationValue) / 2f;
float testX = posX + (width * halfAnimationValueRest);
float testY = posY + (height * halfAnimationValueRest);
float testW = width * animationValue;
float testH = height * animationValue;
String ownDivider = "";
String ownStatus = "";
if (entity != mc.player) {
ownDivider = " | ";
double targetCheck = MathUtility.entity(entity, true, true, false, 1, false);
double playerCheck = MathUtility.entity(mc.player, true, true, false,1, false);
if (targetCheck > playerCheck) {
ownStatus = "Lose";
} else if (targetCheck < playerCheck) {
ownStatus = "Win";
} else if (targetCheck == playerCheck) {
ownStatus = "Tie";
} else {
ownStatus = "Unknown";
}
} else {
ownStatus = ownDivider = "";
}
GlStateManager.pushMatrix();
RenderUtility.sizeAnimation(posX + (width / 2), posY + height / 2, animation.getOutput());
if (is("Обычный")) {
height = 55 / 1.5f;
width = 168 / 1.5f;
headSize = 25;
RenderUtility.drawStyledShadowRectWithChange(ms, posX, posY, width, height);
drawHead(eventRender2D.getMatrixStack(), entity, posX + spacing, posY + spacing + 1, headSize);
drawEatingIndicator(eventRender2D.getMatrixStack(), posX, posY);
Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW, testH);
// Draw name higher with smaller font size and moved left by 2 units from previous position
float nameWidth = Fonts.montserrat.getWidth(name, 6.5f, .07f);
// Changed from +5 to +3 (moved 2 units left)
Fonts.montserrat.drawText(eventRender2D.getMatrixStack(), name, posX + (width / 2) - (nameWidth / 2) + 3, posY + spacing / 2 - 2, Theme.textColor, 6.5f, .07f);
// Status
Fonts.montserrat.drawText(eventRender2D.getMatrixStack(), ownStatus, posX - 0.5f + headSize + spacing + spacing, posY + 1.5f + spacing + spacing + spacing, Theme.darkTextColor, 6, .05f);
Scissor.unset();
Scissor.pop();
Vector4i vector4i = new Vector4i(Theme.rectColor, Theme.rectColor, Theme.mainRectColor, Theme.mainRectColor);
// Circle for health display
float circleRadius = 12;
float circleX = posX + width - circleRadius - spacing;
// Circle positioned at bottom
float circleY = posY + height - circleRadius - spacing;
// Background circle (gray)
RenderUtility.drawCircleWithFill(circleX, circleY, 0, 360, circleRadius, 3.5f, false, ColorUtility.rgb(32, 32, 32));
// Active part of circle (health)
float healthAngle = 360 * healthAnimation;
RenderUtility.drawCircleWithFill(circleX, circleY, 0, healthAngle, circleRadius, 3.5f, false, Theme.rectColor);
// Absorption health layer (yellow)
if (absorptionAnimation > 0) {
float absorptionStartAngle = healthAngle;
float absorptionEndAngle = absorptionStartAngle + (360 * absorptionAnimation);
// Draw absorption health in yellow color
RenderUtility.drawCircleWithFill(circleX, circleY, absorptionStartAngle, absorptionEndAngle, circleRadius, 3.5f, false, ABSORPTION_COLOR);
}
boolean currentEatingState = isEntityEating(entity);
if (currentEatingState != isEating) {
spawnEatingParticles(posX, posY, currentEatingState);
}
// Shadow for health circle
RenderUtility.drawShadow(circleX - circleRadius, circleY - circleRadius, circleRadius * 2, circleRadius * 2, 8, ColorUtility.setAlpha(Theme.rectColor, 80), ColorUtility.setAlpha(Theme.mainRectColor, 80));
// Text with health percentage in center of circle
// Calculate total health percentage including absorption
float totalHealthPercentage = (healthAnimation + absorptionAnimation) * 100;
String healthPercent = Math.round(totalHealthPercentage) + "%";
float textWidth = Fonts.montserrat.getWidth(healthPercent, 6, .05f);
Fonts.montserrat.drawText(eventRender2D.getMatrixStack(), healthPercent, circleX - textWidth / 2, circleY - 3, Theme.textColor, 6, .05f);
// Draw health bar particles
updateAndRenderHealthParticles(ms, circleX, circleY, circleRadius);
}
// Draw items at bottom center
float itemsY = posY + height - 14; // Position at bottom with small offset
float itemsX = posX + (width / 2) - 24; // Center the items horizontally
drawItemStack(itemsX, itemsY, 8, 0.5f);
GlStateManager.popMatrix();
}
if (Evaware.getInst().getModuleManager().getHud().particlesOnTarget.getValue()) {
for (HeadParticle p : Evaware.getInst().getModuleManager().getHud().getParticles()) {
if (System.currentTimeMillis() - p.time > 2000L) {
Evaware.getInst().getModuleManager().getHud().getParticles().remove(p);
}
p.update();
size = 1.0f - (float)(System.currentTimeMillis() - p.time) / 2000.0f;
RenderUtility.drawCircle((float)p.pos.x, (float)p.pos.y, 3.5f, ColorUtility.setAlpha(Theme.rectColor, (int)(255.0f * p.alpha * size)));
}
}
}
/**
* Spawns particles when health changes
*/
private void spawnHealthChangeParticles(float posX, float posY, boolean isDamage) {
// Circle position variables
float circleRadius = 12;
float circleX = posX + width - circleRadius - spacing;
float circleY = posY + height - circleRadius - spacing;
int particleCount = isDamage ? 8 : 5;
int color = isDamage ? Theme.rectColor : ColorUtility.rgb(50, 200, 50);
for (int i = 0; i < particleCount; i++) {
// Calculate random angle around the health circle
float randomAngle = ThreadLocalRandom.current().nextFloat() * 360f;
float radians = (float) Math.toRadians(randomAngle);
// Position particle on the edge of the circle
float particleX = circleX + (float) Math.cos(radians) * circleRadius;
float particleY = circleY + (float) Math.sin(radians) * circleRadius;
// Create velocity outward from circle
float velX = (float) Math.cos(radians) * (isDamage ? 2.0f : 1.2f);
float velY = (float) Math.sin(radians) * (isDamage ? 2.0f : 1.2f);
// Add slight randomization to velocity
velX += ThreadLocalRandom.current().nextFloat() * 0.8f - 0.4f;
velY += ThreadLocalRandom.current().nextFloat() * 0.8f - 0.4f;
// Add particle
healthParticles.add(new HealthParticle(
particleX,
particleY,
velX,
velY,
isDamage ? ThreadLocalRandom.current().nextFloat() * 1.5f + 1.0f :
ThreadLocalRandom.current().nextFloat() * 1.0f + 0.5f,
color,
isDamage
));
}
}
/**
* Spawns particles for absorption health changes
*/
private void spawnAbsorptionParticles(float posX, float posY) {
// Circle position variables
float circleRadius = 12;
float circleX = posX + width - circleRadius - spacing;
float circleY = posY + height - circleRadius - spacing;
for (int i = 0; i < 6; i++) {
// Calculate random angle around the health circle
float randomAngle = ThreadLocalRandom.current().nextFloat() * 360f;
float radians = (float) Math.toRadians(randomAngle);
// Position particle on the edge of the circle
float particleX = circleX + (float) Math.cos(radians) * circleRadius;
float particleY = circleY + (float) Math.sin(radians) * circleRadius;
// Create velocity outward from circle
float velX = (float) Math.cos(radians) * 1.5f;
float velY = (float) Math.sin(radians) * 1.5f;
// Add slight randomization to velocity
velX += ThreadLocalRandom.current().nextFloat() * 0.6f - 0.3f;
velY += ThreadLocalRandom.current().nextFloat() * 0.6f - 0.3f;
// Add particle - use absorption color
healthParticles.add(new HealthParticle(
particleX,
particleY,
velX,
velY,
ThreadLocalRandom.current().nextFloat() * 1.0f + 0.5f,
ABSORPTION_COLOR,
false
));
}
}
/**
* Updates and renders health bar particles
*/
private void updateAndRenderHealthParticles(MatrixStack ms, float circleX, float circleY, float circleRadius) {
Iterator<HealthParticle> iterator = healthParticles.iterator();
while (iterator.hasNext()) {
HealthParticle particle = iterator.next();
// Update particle
particle.update();
// Draw particle
if (particle.getAlpha() > 0.05f) {
float size = particle.getSize() * (particle.isDamage() ?
(1.0f - ((float)(System.currentTimeMillis() - particle.getCreationTime()) / 800.0f)) :
MathHelper.clamp(((float)(System.currentTimeMillis() - particle.getCreationTime()) / 200.0f), 0.2f, 1.0f)
);
if (size > 0.1f) {
RenderUtility.drawCircle(
particle.getX(),
particle.getY(),
size,
ColorUtility.setAlpha(particle.getColor(), (int)(255.0f * particle.getAlpha()))
);
}
}
// Remove old particles
if (System.currentTimeMillis() - particle.getCreationTime() > 800) {
iterator.remove();
}
}
}
private LivingEntity getTarget(LivingEntity nullTarget) {
boolean hitAuraIsState = Evaware.getInst().getModuleManager().getHitAura().isEnabled();
LivingEntity finalTarget = hitAuraIsState ? Evaware.getInst().getModuleManager().getHitAura().getTarget() : null;
LivingEntity target = nullTarget;
if (finalTarget != null) {
timerUtility.reset();
allow = true;
target = finalTarget;
} else if (mc.currentScreen instanceof ChatScreen) {
timerUtility.reset();
allow = true;
target = mc.player;
} else {
allow = false;
}
return target;
}
private void drawHead(MatrixStack matrix, final Entity entity, final double x, final double y, final int size) {
if (entity instanceof AbstractClientPlayerEntity player) {
RenderSystem.enableBlend();
RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
RenderSystem.alphaFunc(GL11.GL_GREATER, 0);
RenderSystem.enableTexture();
mc.getTextureManager().bindTexture(player.getLocationSkin());
float hurtPercent = (((AbstractClientPlayerEntity) entity).hurtTime - (((AbstractClientPlayerEntity) entity).hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
RenderSystem.color4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
AbstractGui.blit(matrix, (float) x, (float) y, size, size, 4F, 4F, 4F, 4F, 32F, 32F);
RenderUtility.scaleStart((float) (x + size / 2F), (float) (y + size / 2F), 1.1F);
AbstractGui.blit(matrix, (float) x, (float) y, size, size, 20, 4, 4, 4, 32, 32);
RenderUtility.scaleEnd();
RenderSystem.disableBlend();
} else {
int color = ColorUtility.getColor(20, 128);
RectUtility.getInstance().drawRoundedRectShadowed(matrix, (float) x, (float) y, (float) (x + size), (float) (y + size), 2F, 1, color, color, color, color, false, false, true, true);
ClientFonts.interRegular[size * 2].drawCenteredString(matrix, "?", x + (size / 2F), y + 3 + (size / 2F) - (ClientFonts.interRegular[size * 2].getFontHeight() / 2F), -1);
}
}
private void drawItemStack(float x, float y, float offset, float scale) {
ArrayList<ItemStack> stackList = new ArrayList(Arrays.asList(this.entity.getHeldItemMainhand(), this.entity.getHeldItemOffhand()));
stackList.addAll((Collection)this.entity.getArmorInventoryList());
AtomicReference<Float> posX = new AtomicReference(x);
stackList.stream().filter((stack) -> {
return !stack.isEmpty();
}).forEach((stack) -> {
drawItemStack(stack, (Float)posX.getAndAccumulate(offset, Float::sum), y, true, true, scale);
});
}
public void drawItemStack(ItemStack stack, float x, float y, boolean withoutOverlay, boolean scale, float scaleValue) {
RenderSystem renderSystem = new RenderSystem();
renderSystem.pushMatrix();
renderSystem.translatef(x, y, 0.0F);
if (scale) {
GL11.glScaled((double)scaleValue, (double)scaleValue, (double)scaleValue);
}
mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, 0, 0);
if (withoutOverlay) {
mc.getItemRenderer().renderItemOverlays(mc.fontRenderer, stack, 0, 0);
}
renderSystem.popMatrix();
}
public static boolean is(String name) {
return Evaware.getInst().getModuleManager().getHud().tHudMode.is(name);
}
public class FloatFormatter {
public float format(float value) {
float multiplier = (float) Math.pow(10, 1);
return Math.round(value * multiplier) / multiplier;
}
}
/**
* Health Bar Particle class to handle particles that emanate from the health bar
*/
@FieldDefaults(level = AccessLevel.PRIVATE)
@Getter
public static class HealthParticle {
float x;
float y;
float velX;
float velY;
float size;
float alpha = 0.0f;
int color;
boolean isDamage;
final long creationTime;
public HealthParticle(float x, float y, float velX, float velY, float size, int color, boolean isDamage) {
this.x = x;
this.y = y;
this.velX = velX;
this.velY = velY;
this.size = size;
this.color = color;
this.isDamage = isDamage;
this.creationTime = System.currentTimeMillis();
}
public void update() {
// Update position
x += velX;
y += velY;
// Apply damping to velocity
velX *= 0.95f;
velY *= 0.95f;
// Update alpha based on lifetime
if (isDamage) {
// For damage particles, fade out after initially fading in
float lifetime = (System.currentTimeMillis() - creationTime) / 800.0f;
alpha = lifetime < 0.2f ?
MathUtility.lerp(alpha, 1.0f, 0.3f) :
MathUtility.lerp(alpha, 0.0f, 0.06f);
} else {
// For healing/absorption particles, fade out more gradually
float lifetime = (System.currentTimeMillis() - creationTime) / 800.0f;
alpha = lifetime < 0.3f ?
MathUtility.lerp(alpha, 0.8f, 0.2f) :
MathUtility.lerp(alpha, 0.0f, 0.04f);
}
}
}
public static class HeadParticle {
private Vector3d pos;
private final Vector3d end;
private final long time;
private float alpha;
public HeadParticle(Vector3d pos) {
this.pos = pos;
this.end = pos.add((double)(-ThreadLocalRandom.current().nextFloat(-80.0F, 80.0F)), (double)(-ThreadLocalRandom.current().nextFloat(-80.0F, 80.0F)), (double)(-ThreadLocalRandom.current().nextFloat(-80.0F, 80.0F)));
this.time = System.currentTimeMillis();
}
public void update() {
this.alpha = MathUtility.lerp(this.alpha, 1.0F, 10.0F);
this.pos = MathUtility.fast(this.pos, this.end, 0.5F);
}
}
}
так вот туториал как его кастрировать что пропал индекатор
удалаете
удалайте:
float eatingAnimation = 0.0f;
boolean isEating = false;
ItemStack currentEatingItem = null;
long eatingStartTime = 0;
private boolean isEntityEating(LivingEntity entity) {
private float getEatingProgress(LivingEntity entity) {
private void drawEatingIndicator(MatrixStack ms, float posX, float posY) {
private void spawnEatingParticles(float posX, float posY, boolean isStarting) {
drawEatingIndicator(eventRender2D.getMatrixStack(), posX, posY);
boolean currentEatingState = isEntityEating(entity);
if (currentEatingState != isEating) {
spawnEatingParticles(posX, posY, currentEatingState);
}
Вложения
Последнее редактирование: