TargetHud Forge 1.16.5

  • Автор темы Автор темы ak1
  • Дата начала Дата начала
Forge Api ;-;
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
3 Май 2023
Сообщения
854
Реакции
19
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
таргет худ созданный за 5 минут и залитый сюда с 13 попытки
TargetHud:
Expand Collapse Copy
AnimationUtil animationUtil4 = new AnimationUtil(0.1f), animationUtil5 = new AnimationUtil(0.1f), animationUtilABS1 = new AnimationUtil(0.1f), animationUtilABS2 = new AnimationUtil(0.1f);

int targetHUDX = 120, targetHUDY = 120;

PlayerEntity playerEntity;
LivingEntity entity;

public static Color color1 = new Color(ваш_цвет);
public static Color color2 = new Color(ваш_цвет);

public static Color colorABS1 = new Color(255, 241, 0);
public static Color colorABS2 = new Color(255, 118, 22);


if (entity != null && mc.player != null) {
                if (mc.player.distanceTo(entity) < 6 && entity.getHealth() > 0 && mc.player.canSee(entity) && !entity.isInvisible() && entity.isAlive()) {
                    animationUtil.to = 1;
                } else {
                    animationUtil.to = 0;
                }
                animationUtil4.to = (int) (entity.getHealth() / entity.getMaxHealth() * 100) + 0.5f;
                animationUtil5.to = (int) (entity.getHealth() / entity.getMaxHealth() * 115) + 0.5f;

                animationUtilABS1.to = (int) (entity.getAbsorptionAmount() * 3) + 0.5f;
                animationUtilABS2.to = (int) (entity.getAbsorptionAmount() * 5) + 0.5f;


                String playerName = limitStringLength(entity.getName().getString(), 8);

                GL11.glPushMatrix();
                GL11.glTranslated(targetHUDX + 65, targetHUDY, 0);
                GL11.glScaled(animationUtil.getAnim(), animationUtil.getAnim(), 0);
                GL11.glTranslated(-(targetHUDX + 65), -targetHUDY, 0);

                DrawHelper.drawRoundedGradientRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedGradientBlurredRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, 2, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedRect(targetHUDX, targetHUDY + 44, 133, 44, 5, colorMain);
                DrawHelper.drawRoundedBlurredRect(targetHUDX + 6, targetHUDY + 38, 32, 32, 5, 4, colorMain.darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, 100, 1, new Color(colorMain.getRGB()).darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                BloomHelper.registerRenderCall(() -> {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                });
                BloomHelper.draw(5);
                if (entity.getAbsorptionAmount() > 0.0f) {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    BloomHelper.registerRenderCall(() -> {
                        DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    });
                    BloomHelper.draw(5);
                }
                try {
                    DrawHelper.drawRoundedTexture(new ResourceLocation("textures/entity/steve.png"), targetHUDX + 7, targetHUDY + 37, 30, 30, 8, 8, 8, 8, 3);
                } catch (Exception ignored) {}
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, playerName, targetHUDX + 44, targetHUDY + 20, new Color(mainText.getRGB()));
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, Math.round(mc.player.getHealth()) > Math.round(entity.getHealth()) ? "§f[§aWIN§f]" : Math.round(mc.player.getHealth()) == Math.round(entity.getHealth()) ? "§f[§6DRAW§f]" : "§f[§cLOSE§f]", targetHUDX + 44, targetHUDY + 35, new Color(mainText.getRGB()));;
                StyledFontRenderer.drawCenteredXString(renderGameOverlay.getMatrixStack(), Proverka.font, String.valueOf(clamp(Math.round(entity.getHealth()), 1, 99)), targetHUDX + 111.5f, targetHUDY + 28, mainText);
                GL11.glPopMatrix();

limitStringLength method:
Expand Collapse Copy
public static String limitStringLength(String str, int maxLength) {
        if (str.length() > maxLength) {
            return str.substring(0, maxLength);
        } else {
            return str;
        }
    }

AnimationUtil (pizdec):
Expand Collapse Copy
public class AnimationUtil {
    public float anim, to, speed;
    long mc = System.currentTimeMillis();

    public AnimationUtil(float speed) {
        this.speed = speed;
    }

    public float getAnim() {
        int count = (int) ((System.currentTimeMillis() - mc) / 5);
        if (count > 0) {
            mc = System.currentTimeMillis();
        }
        for (int i = 0; i < count; i++) {
            anim = MathUtil.lerp(anim, to, speed);
        }
        return anim;
    }
}
twoColorEffect method:
Expand Collapse Copy
public static Color twoColorEffectTh(Color color1, Color color2, float alpha) {
        float val = MathHelper.clamp((float) Math.sin(19 * ((Math.abs(System.currentTimeMillis() / 25) / 200.4) / 2 % 1)) / 2 + 0.5f, 0, 1);
        return new Color(MathUtil.lerp((float) color1.getRed() / 255, (float) color2.getRed() / 255, val), MathUtil.lerp((float) color1.getGreen() / 255, (float) color2.getGreen() / 255, val), MathUtil.lerp((float) color1.getBlue() / 255, (float) color2.getBlue() / 255, val), alpha / 255);
    }

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

------------------------------------------------------------------------------------------------------------------------

Добавил всё что можно чтобы пастеры не задавались вопросом: "как же спастить???"

Loremaster одобри да (хочу чтоб void33x клоуна закинул)

UPD:

LivingEntity entity initialize:
Expand Collapse Copy
    @SubscribeEvent
    public void onAttackEntity(AttackEntityEvent attackEntityEvent) {
        playerEntity = attackEntityEvent.getPlayer();
    }
    @SubscribeEvent
    public void onTick(TickEvent tickEvent) {
        if (mc.player != null && mc.level != null) {
            try {
                entity = (LivingEntity) ((EntityRayTraceResult) mc.hitResult).getEntity();
            } catch (Exception ignored) {
            }
        }
    }
 
Последнее редактирование:
таргет худ созданный за 5 минут и залитый сюда с 13 попытки
TargetHud:
Expand Collapse Copy
AnimationUtil animationUtil4 = new AnimationUtil(0.1f), animationUtil5 = new AnimationUtil(0.1f), animationUtilABS1 = new AnimationUtil(0.1f), animationUtilABS2 = new AnimationUtil(0.1f);

int targetHUDX = 120, targetHUDY = 120;

PlayerEntity playerEntity;
LivingEntity entity;

public static Color color1 = new Color(ваш_цвет);
public static Color color2 = new Color(ваш_цвет);

public static Color colorABS1 = new Color(255, 241, 0);
public static Color colorABS2 = new Color(255, 118, 22);


if (entity != null && mc.player != null) {
                if (mc.player.distanceTo(entity) < 6 && entity.getHealth() > 0 && mc.player.canSee(entity) && !entity.isInvisible() && entity.isAlive()) {
                    animationUtil.to = 1;
                } else {
                    animationUtil.to = 0;
                }
                animationUtil4.to = (int) (entity.getHealth() / entity.getMaxHealth() * 100) + 0.5f;
                animationUtil5.to = (int) (entity.getHealth() / entity.getMaxHealth() * 115) + 0.5f;

                animationUtilABS1.to = (int) (entity.getAbsorptionAmount() * 3) + 0.5f;
                animationUtilABS2.to = (int) (entity.getAbsorptionAmount() * 5) + 0.5f;


                String playerName = limitStringLength(entity.getName().getString(), 8);

                GL11.glPushMatrix();
                GL11.glTranslated(targetHUDX + 65, targetHUDY, 0);
                GL11.glScaled(animationUtil.getAnim(), animationUtil.getAnim(), 0);
                GL11.glTranslated(-(targetHUDX + 65), -targetHUDY, 0);

                DrawHelper.drawRoundedGradientRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedGradientBlurredRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, 2, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedRect(targetHUDX, targetHUDY + 44, 133, 44, 5, colorMain);
                DrawHelper.drawRoundedBlurredRect(targetHUDX + 6, targetHUDY + 38, 32, 32, 5, 4, colorMain.darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, 100, 1, new Color(colorMain.getRGB()).darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                BloomHelper.registerRenderCall(() -> {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                });
                BloomHelper.draw(5);
                if (entity.getAbsorptionAmount() > 0.0f) {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    BloomHelper.registerRenderCall(() -> {
                        DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    });
                    BloomHelper.draw(5);
                }
                try {
                    DrawHelper.drawRoundedTexture(new ResourceLocation("textures/entity/steve.png"), targetHUDX + 7, targetHUDY + 37, 30, 30, 8, 8, 8, 8, 3);
                } catch (Exception ignored) {}
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, playerName, targetHUDX + 44, targetHUDY + 20, new Color(mainText.getRGB()));
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, Math.round(mc.player.getHealth()) > Math.round(entity.getHealth()) ? "§f[§aWIN§f]" : Math.round(mc.player.getHealth()) == Math.round(entity.getHealth()) ? "§f[§6DRAW§f]" : "§f[§cLOSE§f]", targetHUDX + 44, targetHUDY + 35, new Color(mainText.getRGB()));;
                StyledFontRenderer.drawCenteredXString(renderGameOverlay.getMatrixStack(), Proverka.font, String.valueOf(clamp(Math.round(entity.getHealth()), 1, 99)), targetHUDX + 111.5f, targetHUDY + 28, mainText);
                GL11.glPopMatrix();

limitStringLength method:
Expand Collapse Copy
public static String limitStringLength(String str, int maxLength) {
        if (str.length() > maxLength) {
            return str.substring(0, maxLength);
        } else {
            return str;
        }
    }

AnimationUtil (pizdec):
Expand Collapse Copy
public class AnimationUtil {
    public float anim, to, speed;
    long mc = System.currentTimeMillis();

    public AnimationUtil(float speed) {
        this.speed = speed;
    }

    public float getAnim() {
        int count = (int) ((System.currentTimeMillis() - mc) / 5);
        if (count > 0) {
            mc = System.currentTimeMillis();
        }
        for (int i = 0; i < count; i++) {
            anim = MathUtil.lerp(anim, to, speed);
        }
        return anim;
    }
}
twoColorEffect method:
Expand Collapse Copy
public static Color twoColorEffectTh(Color color1, Color color2, float alpha) {
        float val = MathHelper.clamp((float) Math.sin(19 * ((Math.abs(System.currentTimeMillis() / 25) / 200.4) / 2 % 1)) / 2 + 0.5f, 0, 1);
        return new Color(MathUtil.lerp((float) color1.getRed() / 255, (float) color2.getRed() / 255, val), MathUtil.lerp((float) color1.getGreen() / 255, (float) color2.getGreen() / 255, val), MathUtil.lerp((float) color1.getBlue() / 255, (float) color2.getBlue() / 255, val), alpha / 255);
    }

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

------------------------------------------------------------------------------------------------------------------------

Добавил всё что можно чтобы пастеры не задавались вопросом: "как же спастить???"

Loremaster одобри да (хочу чтоб void33x клоуна закинул)
так воид и есть клоун)
 
таргет худ созданный за 5 минут и залитый сюда с 13 попытки
TargetHud:
Expand Collapse Copy
AnimationUtil animationUtil4 = new AnimationUtil(0.1f), animationUtil5 = new AnimationUtil(0.1f), animationUtilABS1 = new AnimationUtil(0.1f), animationUtilABS2 = new AnimationUtil(0.1f);

int targetHUDX = 120, targetHUDY = 120;

PlayerEntity playerEntity;
LivingEntity entity;

public static Color color1 = new Color(ваш_цвет);
public static Color color2 = new Color(ваш_цвет);

public static Color colorABS1 = new Color(255, 241, 0);
public static Color colorABS2 = new Color(255, 118, 22);


if (entity != null && mc.player != null) {
                if (mc.player.distanceTo(entity) < 6 && entity.getHealth() > 0 && mc.player.canSee(entity) && !entity.isInvisible() && entity.isAlive()) {
                    animationUtil.to = 1;
                } else {
                    animationUtil.to = 0;
                }
                animationUtil4.to = (int) (entity.getHealth() / entity.getMaxHealth() * 100) + 0.5f;
                animationUtil5.to = (int) (entity.getHealth() / entity.getMaxHealth() * 115) + 0.5f;

                animationUtilABS1.to = (int) (entity.getAbsorptionAmount() * 3) + 0.5f;
                animationUtilABS2.to = (int) (entity.getAbsorptionAmount() * 5) + 0.5f;


                String playerName = limitStringLength(entity.getName().getString(), 8);

                GL11.glPushMatrix();
                GL11.glTranslated(targetHUDX + 65, targetHUDY, 0);
                GL11.glScaled(animationUtil.getAnim(), animationUtil.getAnim(), 0);
                GL11.glTranslated(-(targetHUDX + 65), -targetHUDY, 0);

                DrawHelper.drawRoundedGradientRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedGradientBlurredRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, 2, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedRect(targetHUDX, targetHUDY + 44, 133, 44, 5, colorMain);
                DrawHelper.drawRoundedBlurredRect(targetHUDX + 6, targetHUDY + 38, 32, 32, 5, 4, colorMain.darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, 100, 1, new Color(colorMain.getRGB()).darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                BloomHelper.registerRenderCall(() -> {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                });
                BloomHelper.draw(5);
                if (entity.getAbsorptionAmount() > 0.0f) {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    BloomHelper.registerRenderCall(() -> {
                        DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    });
                    BloomHelper.draw(5);
                }
                try {
                    DrawHelper.drawRoundedTexture(new ResourceLocation("textures/entity/steve.png"), targetHUDX + 7, targetHUDY + 37, 30, 30, 8, 8, 8, 8, 3);
                } catch (Exception ignored) {}
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, playerName, targetHUDX + 44, targetHUDY + 20, new Color(mainText.getRGB()));
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, Math.round(mc.player.getHealth()) > Math.round(entity.getHealth()) ? "§f[§aWIN§f]" : Math.round(mc.player.getHealth()) == Math.round(entity.getHealth()) ? "§f[§6DRAW§f]" : "§f[§cLOSE§f]", targetHUDX + 44, targetHUDY + 35, new Color(mainText.getRGB()));;
                StyledFontRenderer.drawCenteredXString(renderGameOverlay.getMatrixStack(), Proverka.font, String.valueOf(clamp(Math.round(entity.getHealth()), 1, 99)), targetHUDX + 111.5f, targetHUDY + 28, mainText);
                GL11.glPopMatrix();

limitStringLength method:
Expand Collapse Copy
public static String limitStringLength(String str, int maxLength) {
        if (str.length() > maxLength) {
            return str.substring(0, maxLength);
        } else {
            return str;
        }
    }

AnimationUtil (pizdec):
Expand Collapse Copy
public class AnimationUtil {
    public float anim, to, speed;
    long mc = System.currentTimeMillis();

    public AnimationUtil(float speed) {
        this.speed = speed;
    }

    public float getAnim() {
        int count = (int) ((System.currentTimeMillis() - mc) / 5);
        if (count > 0) {
            mc = System.currentTimeMillis();
        }
        for (int i = 0; i < count; i++) {
            anim = MathUtil.lerp(anim, to, speed);
        }
        return anim;
    }
}
twoColorEffect method:
Expand Collapse Copy
public static Color twoColorEffectTh(Color color1, Color color2, float alpha) {
        float val = MathHelper.clamp((float) Math.sin(19 * ((Math.abs(System.currentTimeMillis() / 25) / 200.4) / 2 % 1)) / 2 + 0.5f, 0, 1);
        return new Color(MathUtil.lerp((float) color1.getRed() / 255, (float) color2.getRed() / 255, val), MathUtil.lerp((float) color1.getGreen() / 255, (float) color2.getGreen() / 255, val), MathUtil.lerp((float) color1.getBlue() / 255, (float) color2.getBlue() / 255, val), alpha / 255);
    }

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

------------------------------------------------------------------------------------------------------------------------

Добавил всё что можно чтобы пастеры не задавались вопросом: "как же спастить???"

Loremaster одобри да (хочу чтоб void33x клоуна закинул)
ну гавно
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
норм
 
так воид и есть клоун)
void знакомо?
Screenshot_20240221-124905.jpg

?
 
TargetHud:
Expand Collapse Copy
AnimationUtil animationUtil4 = new AnimationUtil(0.1f), animationUtil5 = new AnimationUtil(0.1f), animationUtilABS1 = new

Добавил всё что можно чтобы пастеры не задавались вопросом: "как же спастить???"
[/QUOTE]
как спастить
Добавил всё что можно чтобы пастеры не задавались вопросом: "как же спастить???"

Loremaster одобри да (хочу чтоб void33x клоуна закинул)
как спастить
 
таргет худ созданный за 5 минут и залитый сюда с 13 попытки
TargetHud:
Expand Collapse Copy
AnimationUtil animationUtil4 = new AnimationUtil(0.1f), animationUtil5 = new AnimationUtil(0.1f), animationUtilABS1 = new AnimationUtil(0.1f), animationUtilABS2 = new AnimationUtil(0.1f);

int targetHUDX = 120, targetHUDY = 120;

PlayerEntity playerEntity;
LivingEntity entity;

public static Color color1 = new Color(ваш_цвет);
public static Color color2 = new Color(ваш_цвет);

public static Color colorABS1 = new Color(255, 241, 0);
public static Color colorABS2 = new Color(255, 118, 22);


if (entity != null && mc.player != null) {
                if (mc.player.distanceTo(entity) < 6 && entity.getHealth() > 0 && mc.player.canSee(entity) && !entity.isInvisible() && entity.isAlive()) {
                    animationUtil.to = 1;
                } else {
                    animationUtil.to = 0;
                }
                animationUtil4.to = (int) (entity.getHealth() / entity.getMaxHealth() * 100) + 0.5f;
                animationUtil5.to = (int) (entity.getHealth() / entity.getMaxHealth() * 115) + 0.5f;

                animationUtilABS1.to = (int) (entity.getAbsorptionAmount() * 3) + 0.5f;
                animationUtilABS2.to = (int) (entity.getAbsorptionAmount() * 5) + 0.5f;


                String playerName = limitStringLength(entity.getName().getString(), 8);

                GL11.glPushMatrix();
                GL11.glTranslated(targetHUDX + 65, targetHUDY, 0);
                GL11.glScaled(animationUtil.getAnim(), animationUtil.getAnim(), 0);
                GL11.glTranslated(-(targetHUDX + 65), -targetHUDY, 0);

                DrawHelper.drawRoundedGradientRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedGradientBlurredRect(targetHUDX - 0.5f, targetHUDY + 44.5f, 134, 45, 5, 2, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()), new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color2,color1,255).getRGB()),new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                DrawHelper.drawRoundedRect(targetHUDX, targetHUDY + 44, 133, 44, 5, colorMain);
                DrawHelper.drawRoundedBlurredRect(targetHUDX + 6, targetHUDY + 38, 32, 32, 5, 4, colorMain.darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, 100, 1, new Color(colorMain.getRGB()).darker());
                DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                BloomHelper.registerRenderCall(() -> {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtil4.getAnim(), 1, new Color(ColorUtil.twoColorEffect(color1,color2,255).getRGB()));
                });
                BloomHelper.draw(5);
                if (entity.getAbsorptionAmount() > 0.0f) {
                    DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    BloomHelper.registerRenderCall(() -> {
                        DrawHelper.drawCircleOutline(targetHUDX + 111, targetHUDY + 22, 15, 5, (int) animationUtilABS2.getAnim(), 1, new Color(ColorUtil.twoColorEffect(colorABS1, colorABS2, 255).getRGB()));
                    });
                    BloomHelper.draw(5);
                }
                try {
                    DrawHelper.drawRoundedTexture(new ResourceLocation("textures/entity/steve.png"), targetHUDX + 7, targetHUDY + 37, 30, 30, 8, 8, 8, 8, 3);
                } catch (Exception ignored) {}
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, playerName, targetHUDX + 44, targetHUDY + 20, new Color(mainText.getRGB()));
                StyledFontRenderer.drawString(renderGameOverlay.getMatrixStack(), Proverka.font, Math.round(mc.player.getHealth()) > Math.round(entity.getHealth()) ? "§f[§aWIN§f]" : Math.round(mc.player.getHealth()) == Math.round(entity.getHealth()) ? "§f[§6DRAW§f]" : "§f[§cLOSE§f]", targetHUDX + 44, targetHUDY + 35, new Color(mainText.getRGB()));;
                StyledFontRenderer.drawCenteredXString(renderGameOverlay.getMatrixStack(), Proverka.font, String.valueOf(clamp(Math.round(entity.getHealth()), 1, 99)), targetHUDX + 111.5f, targetHUDY + 28, mainText);
                GL11.glPopMatrix();

limitStringLength method:
Expand Collapse Copy
public static String limitStringLength(String str, int maxLength) {
        if (str.length() > maxLength) {
            return str.substring(0, maxLength);
        } else {
            return str;
        }
    }

AnimationUtil (pizdec):
Expand Collapse Copy
public class AnimationUtil {
    public float anim, to, speed;
    long mc = System.currentTimeMillis();

    public AnimationUtil(float speed) {
        this.speed = speed;
    }

    public float getAnim() {
        int count = (int) ((System.currentTimeMillis() - mc) / 5);
        if (count > 0) {
            mc = System.currentTimeMillis();
        }
        for (int i = 0; i < count; i++) {
            anim = MathUtil.lerp(anim, to, speed);
        }
        return anim;
    }
}
twoColorEffect method:
Expand Collapse Copy
public static Color twoColorEffectTh(Color color1, Color color2, float alpha) {
        float val = MathHelper.clamp((float) Math.sin(19 * ((Math.abs(System.currentTimeMillis() / 25) / 200.4) / 2 % 1)) / 2 + 0.5f, 0, 1);
        return new Color(MathUtil.lerp((float) color1.getRed() / 255, (float) color2.getRed() / 255, val), MathUtil.lerp((float) color1.getGreen() / 255, (float) color2.getGreen() / 255, val), MathUtil.lerp((float) color1.getBlue() / 255, (float) color2.getBlue() / 255, val), alpha / 255);
    }

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

------------------------------------------------------------------------------------------------------------------------

Добавил всё что можно чтобы пастеры не задавались вопросом: "как же спастить???"

Loremaster одобри да (хочу чтоб void33x клоуна закинул)
не работает нифига, не отображается бро
не работает нифига, не отображается бро
крашит
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
очередная субстанция которая должна была выйти через жопу но появилась на свет отрыжкой обозначив ее создателя коричневым маркером в нижней части лица
с момента оставленной реакции сидел и думал что же написать
 
бро, в куда сувать
if (entity != null && mc.player != null) {
// и далее

и что за mainText
 
Сделал умный человек сразу видно но шрифт пизд*ц
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
почему при включении инвентарь(быстрые слоты) становятся прозрачными, кроме предметов, а панель хп, брони становятся белыми квадратами? Как фикс?
 
Назад
Сверху Снизу