• Ищем качественного (не новичок) разработчиков Xenforo для этого форума! В идеале, чтобы ты был фулл стек программистом. Если у тебя есть что показать, то свяжись с нами по контактным данным: https://t.me/DREDD

Визуальная часть TargetHud | Ctrl C + Ctrl V

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
9 Дек 2023
Сообщения
11
Реакции
0
Выберите загрузчик игры
  1. Прочие моды
Давненько я не заливал ничего на данный форум.. так что ловите тхуд хз вроде норм мне понравился

SS ->
1753976263434.png

THUD ->

THUD::
Expand Collapse Copy
float posX = drag.getX();
float posY = drag.getY();
float width = 172 / 1.5f;
float height = 59 / 1.5f;

GlStateManager.pushMatrix();

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

KawaseBlur.blur.updateBlur(1,1);
KawaseBlur.blur.render(() -> DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205)));

DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205));
drawTargetHead(entity, posX + 7, posY + 5.5f, 18, 18);;

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
String full = entity.getName().getString();
String name = full.length() > 17 ? full.substring(0, 15) + "..." : full;

Fonts.medium.drawText(eventDisplay.getMatrixStack(), name, posX + headSize + 2.5f, posY + 7.5f, -1, 7);

Scissor.unset();
Scissor.pop();

DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f,2.5f, 1, ColorUtils.rgba(41,49,51,255));
DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f * healthAnimation,2.5f, 1, ColorUtils.getColor(255));

GlStateManager.popMatrix();

drawFace ->
drawFace:
Expand Collapse Copy
    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();
    }
 
Последнее редактирование:
Без мусора, грамотно +rep
 
Давненько я не заливал ничего на данный форум.. так что ловите тхуд хз вроде норм мне понравился

SS ->
Посмотреть вложение 312118
THUD ->

THUD::
Expand Collapse Copy
float posX = drag.getX();
float posY = drag.getY();
float width = 172 / 1.5f;
float height = 59 / 1.5f;

GlStateManager.pushMatrix();

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

KawaseBlur.blur.updateBlur(1,1);
KawaseBlur.blur.render(() -> DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205)));

DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205));
drawTargetHead(entity, posX + 7, posY + 5.5f, 18, 18);;

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
String full = entity.getName().getString();
String name = full.length() > 17 ? full.substring(0, 15) + "..." : full;

Fonts.medium.drawText(eventDisplay.getMatrixStack(), name, posX + headSize + 2.5f, posY + 7.5f, -1, 7);

Scissor.unset();
Scissor.pop();

DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f,2.5f, 1, ColorUtils.rgba(41,49,51,255));
DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f * healthAnimation,2.5f, 1, ColorUtils.getColor(255));

GlStateManager.popMatrix();

drawFace ->
drawFace:
Expand Collapse Copy
    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();
    }
пойдет
 
Ничего лишнего нету, но сам тхуд пустой. width = 172 / 1.5f то же и с height зачем эти лишние вычисления
 
Давненько я не заливал ничего на данный форум.. так что ловите тхуд хз вроде норм мне понравился

SS ->
Посмотреть вложение 312118
THUD ->

THUD::
Expand Collapse Copy
float posX = drag.getX();
float posY = drag.getY();
float width = 172 / 1.5f;
float height = 59 / 1.5f;

GlStateManager.pushMatrix();

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

KawaseBlur.blur.updateBlur(1,1);
KawaseBlur.blur.render(() -> DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205)));

DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205));
drawTargetHead(entity, posX + 7, posY + 5.5f, 18, 18);;

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
String full = entity.getName().getString();
String name = full.length() > 17 ? full.substring(0, 15) + "..." : full;

Fonts.medium.drawText(eventDisplay.getMatrixStack(), name, posX + headSize + 2.5f, posY + 7.5f, -1, 7);

Scissor.unset();
Scissor.pop();

DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f,2.5f, 1, ColorUtils.rgba(41,49,51,255));
DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f * healthAnimation,2.5f, 1, ColorUtils.getColor(255));

GlStateManager.popMatrix();

drawFace ->
drawFace:
Expand Collapse Copy
    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();
    }
сойдет
 
Давненько я не заливал ничего на данный форум.. так что ловите тхуд хз вроде норм мне понравился

SS ->
Посмотреть вложение 312118
THUD ->

THUD::
Expand Collapse Copy
float posX = drag.getX();
float posY = drag.getY();
float width = 172 / 1.5f;
float height = 59 / 1.5f;

GlStateManager.pushMatrix();

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

KawaseBlur.blur.updateBlur(1,1);
KawaseBlur.blur.render(() -> DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205)));

DisplayUtils.drawRoundedRect(posX, posY, 94, 30, 4, ColorUtils.rgba(20,15,11,205));
drawTargetHead(entity, posX + 7, posY + 5.5f, 18, 18);;

Scissor.push();
Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
String full = entity.getName().getString();
String name = full.length() > 17 ? full.substring(0, 15) + "..." : full;

Fonts.medium.drawText(eventDisplay.getMatrixStack(), name, posX + headSize + 2.5f, posY + 7.5f, -1, 7);

Scissor.unset();
Scissor.pop();

DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f,2.5f, 1, ColorUtils.rgba(41,49,51,255));
DisplayUtils.drawRoundedRect(posX + headSize + 2.5f, posY + 20, 55.5f * healthAnimation,2.5f, 1, ColorUtils.getColor(255));

GlStateManager.popMatrix();

drawFace ->
drawFace:
Expand Collapse Copy
    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();
    }
Тему принимали месяц...
 
Назад
Сверху Снизу