Исходник TargetHud Upgrade | expensive 3.1

Начинающий
Статус
Оффлайн
Регистрация
22 Июн 2022
Сообщения
72
Реакции[?]
0
Поинты[?]
0

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней

1720049968281.png


Вот как без

1720049476995.png




Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
3 Май 2024
Сообщения
182
Реакции[?]
0
Поинты[?]
0
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
ну, окей
 
Начинающий
Статус
Оффлайн
Регистрация
16 Май 2024
Сообщения
137
Реакции[?]
1
Поинты[?]
1K
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
с бронёй норм, а так мусор.
 
Начинающий
Статус
Оффлайн
Регистрация
12 Дек 2022
Сообщения
98
Реакции[?]
0
Поинты[?]
0
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
xD я такое пол недели назад сделал только без хп только если у чела талик или сфера там индикация показывается, ну ок мастерам сойдёт
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
30 Июн 2024
Сообщения
2
Реакции[?]
0
Поинты[?]
0
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
Жоска бавеко
 
Начинающий
Статус
Оффлайн
Регистрация
25 Янв 2024
Сообщения
336
Реакции[?]
0
Поинты[?]
1K
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
Блять просто позор добавил броню и изменил полоску - мой вариант таргетхуда:hearteyes::hearteyes:
 
Начинающий
Статус
Оффлайн
Регистрация
5 Май 2023
Сообщения
100
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
31 Авг 2023
Сообщения
699
Реакции[?]
6
Поинты[?]
5K
поменял цвет полоски браво,на тебе весь югейм держиться бро:hearteyecat:
 
Начинающий
Статус
Оффлайн
Регистрация
5 Май 2023
Сообщения
100
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
31 Авг 2023
Сообщения
699
Реакции[?]
6
Поинты[?]
5K
В чем твой доеб, лишним оно тут явно не будет, когда новые темы постятся раз в пол года
в том что это говно не кому не нужное новорожденный ребенок справиться нажать на панельку и выбрать зеленый цвет
 
Начинающий
Статус
Оффлайн
Регистрация
5 Май 2023
Сообщения
100
Реакции[?]
0
Поинты[?]
0
в том что это говно не кому не нужное новорожденный ребенок справиться нажать на панельку и выбрать зеленый цвет
Ну пусть делает, мне какое дело
в том что это говно не кому не нужное новорожденный ребенок справиться нажать на панельку и выбрать зеленый цвет
Мне теперь разрешения надо спрашивать, что выкладывать, а что нет?
 
Начинающий
Статус
Оффлайн
Регистрация
31 Авг 2023
Сообщения
699
Реакции[?]
6
Поинты[?]
5K
Ну пусть делает, мне какое дело

Мне теперь разрешения надо спрашивать, что выкладывать, а что нет?
я тебе говорю это говно , любой человек изменит цвет,ты сидишь вау я залил таргет худ который уже был но поменял цвет у полоски,нахуй иди с такими темами
 
Начинающий
Статус
Оффлайн
Регистрация
16 Сен 2024
Сообщения
21
Реакции[?]
0
Поинты[?]
0
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
бро как уменьшить таргетхуд типо что б во вертикале бюыла меньше и броня стала на прозрачном фоне
 
Начинающий
Статус
Оффлайн
Регистрация
19 Мар 2023
Сообщения
6
Реакции[?]
0
Поинты[?]
0
Ориг таргет худа: Мой вариант худа | Expensive 3.1

Просто добавил полосу хп, чтобы при убавлении хп становилась красной и добавил армор и сделал, что если на вас одета не все броня, то она авто матически сдвигалась влево


Вот как выглядит с броней



Вот как без





Код:
package  im.expensive.ui.display.impl;

import com.mojang.blaze3d.platform.GlStateManager;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.EaseBackIn;
import im.expensive.utils.client.ClientUtil;
import im.expensive.utils.drag.Dragging;
import im.expensive.utils.math.MathUtil;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.render.*;
import im.expensive.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import org.lwjgl.opengl.GL11;

@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity = null;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        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();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }
healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
&& (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
hp = score.getScorePoints();
                maxHp = 20;
            }



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;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 8);

            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));


            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f,8, ColorUtils.rgba(25,26,40,165));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + 77, posY + spacing, 75 / 1.75f, 75 / 1.75f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);

            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - 28, posY + spacing + 12, -1, 8);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - 28,
                    posY + spacing + 22, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66), 4, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

            drawArmor(eventDisplay, posX + headSize + spacing + spacing - 28, posY + spacing + 32);
            int healthColor = interpolateColor(ColorUtils.rgb(255, 0, 0), ColorUtils.rgb(0, 255, 0), healthAnimation);

            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, healthColor);
            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, new Vector4f(4, 4, 4, 4), healthColor);

            GlStateManager.popMatrix();
        }
}


private int interpolateColor(int startColor, int endColor, float fraction) {
int startAlpha = (startColor >> 24) & 0xff;
        int startRed = (startColor >> 16) & 0xff;
        int startGreen = (startColor >> 8) & 0xff;
        int startBlue = startColor & 0xff;

        int endAlpha = (endColor >> 24) & 0xff;
        int endRed = (endColor >> 16) & 0xff;
        int endGreen = (endColor >> 8) & 0xff;
        int endBlue = endColor & 0xff;

        int alpha = (int) (startAlpha + (endAlpha - startAlpha) * fraction);
        int red = (int) (startRed + (endRed - startRed) * fraction);
        int green = (int) (startGreen + (endGreen - startGreen) * fraction);
        int blue = (int) (startBlue + (endBlue - startBlue) * fraction);

        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }




private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Expensive.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
allow = false;
        }
return target;
    }

public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
if (entity != null) {
EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
        }
}


public static void sizeAnimation(double width, double height, double scale) {
GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 0);
    }

public void drawFace(ResourceLocation res, float d,
                         float y,
                         float u,
                         float v,
                         float uWidth,
                         float vHeight,
                         float width,
                         float height,
                         float tileWidth,
                         float tileHeight,
                         LivingEntity target) {
GL11.glPushMatrix();
        GL11.glEnable(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 24, 40, 90));
    }
private void drawArmor(EventDisplay eventDisplay, float x, float y) {
float spacing = 11.5f;
        float scale = 0.7f;
        float offsetX = 0;

        ItemStack helmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD);
        ItemStack chestplate = entity.getItemStackFromSlot(EquipmentSlotType.CHEST);
        ItemStack leggings = entity.getItemStackFromSlot(EquipmentSlotType.LEGS);
        ItemStack boots = entity.getItemStackFromSlot(EquipmentSlotType.FEET);
        ItemStack heldItem = entity.getHeldItemOffhand();

        boolean allEmpty = (helmet == null || helmet.isEmpty()) &&
(chestplate == null || chestplate.isEmpty()) &&
(leggings == null || leggings.isEmpty()) &&
(boots == null || boots.isEmpty()) &&
(heldItem == null || heldItem.isEmpty());

        if (allEmpty) {
float textX = x - 0;
            float textY = y - 30;
            Fonts.sfui.drawText(eventDisplay.getMatrixStack(), "none", textX, textY, -1, 5.8f);
        } else {
if (helmet != null && !helmet.isEmpty()) {
renderItemStack(eventDisplay, helmet, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (chestplate != null && !chestplate.isEmpty()) {
renderItemStack(eventDisplay, chestplate, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (leggings != null && !leggings.isEmpty()) {
renderItemStack(eventDisplay, leggings, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (boots != null && !boots.isEmpty()) {
renderItemStack(eventDisplay, boots, x + offsetX, y - 33, scale);
                offsetX += spacing;
            }
if (heldItem != null && !heldItem.isEmpty()) {
renderItemStack(eventDisplay, heldItem, x + offsetX, y - 31f, scale * 0.63f);
            }
}
}

private void renderItemStack(EventDisplay eventDisplay, ItemStack stack, float x, float y, float scale) {
GlStateManager.pushMatrix();
        GlStateManager.enableDepthTest();
        GlStateManager.scalef(scale, scale, scale);
        mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, (int) (x / scale), (int) (y / scale));
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) (x / scale), (int) (y / scale),
                stack.getCount() > 1 ? String.valueOf(stack.getCount()) : "");
        GlStateManager.disableDepthTest();
        GlStateManager.popMatrix();
    }

}
Если хотите удалить none то просто на 240 строчке удаляете
братва моно гайд как поменять броню и ник местами
 
Сверху Снизу