Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

TargetHUD Nursultan skid | Expensive 3.1

  • Автор темы Автор темы Ksafik
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
5 Ноя 2023
Сообщения
235
Реакции
0
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
 
Последнее редактирование:
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
Фу капец криво
 
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
фу бля
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
?
 
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
:FailFish:
 
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
как тебе не стыдно мой код брать под основу?
 
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
:roflanBuldiga: криво оч получилось, увы
 
твой говно код, как и этот не кому не нужен
1716483551869.png
 
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
че за пиво такое выпил я в ахуе:SMOrc:
 
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
сука я надеюсь ты это по рофлу залил иван золо
голову сами почините она чуть низкая
у тя iq походу чуть низкое
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


голову сами почините она чуть низкая
уро,впервые на югейме - норм закругление!
 
твой говно код, как и этот не кому не нужен
для тех кому
сука я надеюсь ты это по рофлу залил иван золо

у тя iq походу чуть низкое
я это сделал потому-что SELFFFF$C0DDRRR$$$$ не смогли сделать чтоб если хп 20 то полоска зеленая если 10 то желтая и т.д авхыазхызавхы
че за пиво такое выпил я в ахуе:SMOrc:
самодельное :roflanEbalo:
 
уро,впервые на югейме - норм закругление!
дефолт стенсил лол


Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();
 
бля ты даже нормально написать нечего не можешь, как ты ваще чтото можешь написать
дефолт стенсил лол


Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();
годно
Код:
Expand Collapse Copy
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer2 implements ElementRenderer {
final StopWatch stopWatch = new StopWatch();
final Dragging drag;
LivingEntity entity = null;
LivingEntity target;
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 = 33;
float spacing = 3;

float width = 172 / 1.5f;
float height = 59 / 1.5f;
float width1 = 172 / 1.5f;
float height2 = 89 / 1.5f;
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();
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());

//глов
            //DisplayUtils.drawShadow(posX, posY, width, height, 9, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());


            drawStyledRect(posX, posY + 1f, width, height + -2f, rounding + 4, 255);
//рендерится голова
            Stencil.initStencilToWrite();
DisplayUtils.drawRoundedRect(posX + spacing, posY + spacing + 1, headSize, headSize,8, Color.WHITE.getRGB() );
Stencil.readStencilBuffer(1);
drawTargetHead(entity, posX + spacing, posY + spacing + 1, headSize, headSize);
Stencil.uninitStencilBuffer();

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing, posY + 2 + spacing + 1, -1, 8);
Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), "HP: " + (int) hp, posX + headSize + spacing + spacing,
posY + 3 + spacing + 7 + spacing + spacing, ColorUtils.rgb(200, 200, 200), 7);
Scissor.unset();
Scissor.pop();

Vector4i vector4i = new Vector4i(Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB(), Color.GREEN.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector5i = new Vector4i(Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB(), Color.YELLOW.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());
            Vector4i vector6i = new Vector4i(Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB(), Color.RED.getRGB()); //style.getFirstColor().getRGB(), //style.getSecondColor().getRGB(), //style.getSecondColor().getRGB());

            DisplayUtils.drawRoundedRect(posX + 1 + headSize + spacing + spacing, posY + 3 + height - spacing * 3 - 6, (width - 42), 7, new Vector4f(4, 4, 4, 4), ColorUtils.rgb(32, 32, 32));

//глов на полоске
             //   DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + 10 + height - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());


            if (hp >= 14) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector4i);
}
else if (hp >= 7) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector5i);
}
else if(hp >= 0) {
DisplayUtils.drawRoundedRect(posX + -1 + headSize + spacing + spacing , posY + 3 + height - spacing * 3 - 6 , (width - 42) * healthAnimation , 7 , new Vector4f(4 , 4 , 4 , 4) , vector6i);
}

//  DisplayUtils.drawShadow(posX + headSize + spacing + spacing, posY + -15 + height2 - spacing * 2 - 3, (width - 42) * healthAnimation, 7, 8, Color.BLACK.getRGB(), Color.BLACK.getRGB());

            GlStateManager.popMatrix();
}
}


private LivingEntity getTarget(LivingEntity nullTarget) {
LivingEntity auraTarget = Alpha.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, int alpha) {
Style style = Alpha.getInstance().getStyleManager().getCurrentStyle();

DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, alpha));
}

шрифты нурика если найдете сами сделаете а так можете не писать что говно код мне пох если чесно сделано под пивом и нуром альфой для чека ориги
ну и затемнение сами там уже делайте база тхуда с югейма не засирать - не буду отвечать
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

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


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

годно

хотя в майнкрафте не так хуево выглядит, беру свои слова назад
спс
 
Слишком маленький, длинный ник плохо видно будет. + нет свечения
 
Назад
Сверху Снизу