Исходник Scoreboard / hotbar visual (Работает и на Expensive 2.0)

Забаненный
Статус
Оффлайн
Регистрация
29 Дек 2023
Сообщения
138
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.

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

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

Спасибо!

Апдейт скорборда и простой хотбар

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


Rarchik:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Group;
import owner.build.api.Register;
import owner.build.api.settings.imp.Clasp;
import owner.build.starting.events.Event;


@Register(name = "Scoreboard", type = Group.Render)
public class Scoreboard extends Function {

    public Clasp font = new Clasp("Покрывало", true);

    public Scoreboard() { addSettings(font); }

    @Override
    public void onEvent(Event event) {

    }
}

//upd
scoreboard IngameGui


Rarchik:
// func_238447_a_ метод в InGameGui


private void func_238447_a_(MatrixStack p_238447_1_, ScoreObjective p_238447_2_) {
        EventOverlaysRender overlaysRender = new EventOverlaysRender(EventOverlaysRender.OverlayType.SCOREBOARD);
        EventManager.call(overlaysRender);

        if (overlaysRender.isCancel) {
            return;
        }
        Scoreboard scoreboard = p_238447_2_.getScoreboard();
        Collection<Score> collection = scoreboard.getSortedScores(p_238447_2_);
        List<Score> list = collection.stream().filter((p_lambda$renderScoreboard$1_0_) ->
        {
            return p_lambda$renderScoreboard$1_0_.getPlayerName() != null && !p_lambda$renderScoreboard$1_0_.getPlayerName().startsWith("#");
        }).collect(Collectors.toList());

        if (list.size() > 15) {
            collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
        } else {
            collection = list;
        }

        List<Pair<Score, ITextComponent>> list1 = Lists.newArrayListWithCapacity(collection.size());
        ITextComponent itextcomponent = p_238447_2_.getDisplayName();
        int i = this.getFontRenderer().getStringPropertyWidth(itextcomponent);
        int j = i;
        int k = this.getFontRenderer().getStringWidth(": ");

        for (Score score : collection) {
            ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
            ITextComponent itextcomponent1 = ScorePlayerTeam.func_237500_a_(scoreplayerteam, new StringTextComponent(score.getPlayerName()));
            list1.add(Pair.of(score, itextcomponent1));
            j = Math.max(j, this.getFontRenderer().getStringPropertyWidth(itextcomponent1) + k + this.getFontRenderer().getStringWidth(Integer.toString(score.getScorePoints())));
        }

        int i2 = collection.size() * 9;
        int j2 = this.scaledHeight / 2 + i2 / 3;
        int k2 = 3;
        int l2 = this.scaledWidth - j - 3;
        int l = 0;
        int k4 = j2 - l * 9;
        int i1 = this.mc.gameSettings.getTextBackgroundColor(0.3F);
        int j1 = this.mc.gameSettings.getTextBackgroundColor(0.4F);
        for (Pair<Score, ITextComponent> pair : list1) {
            ++l;
            Score score1 = pair.getFirst();
            ITextComponent itextcomponent2 = pair.getSecond();
            String s = TextFormatting.RED + "" + score1.getScorePoints();
            int k1 = j2 - l * 9;
            int l1 = this.scaledWidth - 3 + 2;
            fill(p_238447_1_, l2 - 2, k1, l1, k1 + 9, i1);

            this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent2, (float) l2, (float) k1, -1);
            if (Managment.FUNCTION_MANAGER != null && Managment.FUNCTION_MANAGER.nameProtect.state) {
                this.getFontRenderer().drawString(p_238447_1_, Managment.FUNCTION_MANAGER.nameProtect.patch(s), (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);
            } else
                this.getFontRenderer().drawString(p_238447_1_, s, (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);

            if (l == collection.size()) {

                int blitStandartY = this.scaledHeight - 22;
                int blitItemY = blitStandartY + 3;
                this.setBlitOffset(-90);
                boolean customBoard = Managment.FUNCTION_MANAGER.scoreboard.state;
                if (customBoard) {
                    int firstColor = ColorUtil.getColorStyle(0);
                    int secondColor = ColorUtil.getColorStyle(90);
                    int alpha = (int) (0.1 * 255);
                    int firstColorWithAlpha = ColorUtil.setColorAlpha(firstColor, alpha);
                    int secondColorWithAlpha = ColorUtil.setColorAlpha(secondColor, alpha);

                    if (Managment.FUNCTION_MANAGER.scoreboard.font.get()) {
                        drawShadow(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, firstColorWithAlpha, secondColorWithAlpha, ColorUtil.getColorStyle(0F), ColorUtil.getColorStyle(90F));
                    }
                    BloomHelper.registerRenderCall(() -> RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    )));
                    RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    ));
                }

                fill(p_238447_1_, l2 - 2, k1 - 9 - 1, l1, k1 - 1, j1);
                fill(p_238447_1_, l2 - 2, k1 - 1, l1, k1, i1);
                this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent, (float) (l2 + j / 2 - i / 2), (float) (k1 - 9), -1);
            }
        }
    }

HotBar

Java:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Register;
import owner.build.api.Group;
import owner.build.starting.events.Event;

@Register(name = "HotBar", type = Group.Render)
public class Hotbar extends Function {
    @Override
    public void onEvent(Event event) {

    }
}
inGameGuihotbar


Java:
protected void renderHotbar(float partialTicks, MatrixStack matrixStack) {
        PlayerEntity playerentity = this.getRenderViewPlayer();

        if (playerentity != null) {
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
            this.mc.getTextureManager().bindTexture(WIDGETS_TEX_PATH);
            ItemStack itemstack = playerentity.getHeldItemOffhand();
            HandSide handside = playerentity.getPrimaryHand().opposite();
            int i = this.scaledWidth / 2;
            int j = this.getBlitOffset();
            int k = 182;
            int l = 91;
            int firstColor = ColorUtil.getColorStyle(0);
            int secondColor = ColorUtil.getColorStyle(90);
            boolean customHotbar = Managment.FUNCTION_MANAGER.hotbar.state;
            int blitStandartY = this.scaledHeight - 22;
            int blitItemY = blitStandartY + 3;
            this.setBlitOffset(-90);
            if (customHotbar) {
                {
                    int x = i - 91;
                    int y = blitStandartY;
                    int x2 = 182;
                    int y2 = 22;
                    Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 4, java.awt.Color.WHITE.getRGB());
                    //RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 2, 10, firstColor, secondColor, firstColor, secondColor);
                    //RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 2, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 2.5f, new java.awt.Color(0, 0, 0, 100).getRGB());
                }
                {
                    int x = i - 91 - 1 + playerentity.inventory.currentItem * 20;
                    int y = blitStandartY - 1;
                    int x2 = 24;
                    int y2 = 22;
                    RenderUtil.Render2D.drawShadow(x + 2, y + 2, x2 - 4, y2 - 4, 15, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawGradientRound(x + 2, y + 2, x2 - 4, y2 - 4, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x + 2, y + 2, x2 - 4, y2 - 4, 3, new java.awt.Color(0, 0, 0,100).getRGB());
                }
            } else {
                this.blit(matrixStack, i - 91, blitStandartY, 0, 0, 182, 22);
                this.blit(matrixStack, i - 91 - 1 + playerentity.inventory.currentItem * 20, blitStandartY - 1, 0, 22, 24, 22);
            }

            if (!itemstack.isEmpty()) {
                if (handside == HandSide.LEFT) {
                    if (!customHotbar)
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    else {
                        int x = i - 91 - 28;
                        int y = blitStandartY;
                        int x2 = 20;
                        int y2 = 21;
                        Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 3, java.awt.Color.WHITE.getRGB());
                        RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 1, 7, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 1, 3, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 2.5f, ColorUtil.rgba(0, 0, 0, 100));
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    }
                } else {
                    this.blit(matrixStack, i + 91, blitStandartY - 1, 53, 22, 29, 24);
                }
            }

            this.setBlitOffset(j);
            RenderSystem.enableRescaleNormal();
            RenderSystem.enableBlend();
            RenderSystem.defaultBlendFunc();
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            CustomItems.setRenderOffHand(false);

            for (int i1 = 0; i1 < 9; ++i1) {
                int j1 = i - 90 + i1 * 20 + 2;
                int k1 = blitItemY - 1;
                this.renderHotbarItem(j1, k1, partialTicks, playerentity, playerentity.inventory.mainInventory.get(i1));
            }

            if (!itemstack.isEmpty()) {
                CustomItems.setRenderOffHand(true);
                int i2 = blitItemY - 1;

                if (handside == HandSide.LEFT) {
                    this.renderHotbarItem(i - 91 - 26, i2, partialTicks, playerentity, itemstack);
                } else {
                    this.renderHotbarItem(i + 91 + 10, i2, partialTicks, playerentity, itemstack);
                }

                CustomItems.setRenderOffHand(false);
            }

            if (this.mc.gameSettings.attackIndicator == AttackIndicatorStatus.HOTBAR) {
                float f = this.mc.player.getCooledAttackStrength(0.0F);

                if (f < 1.0F) {
                    int j2 = blitStandartY - 2;
                    int k2 = i + 91 + 6;

                    if (handside == HandSide.RIGHT) {
                        k2 = i - 91 - 22;
                    }

                    this.mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
                    int l1 = (int) (f * 19.0F);
                    RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                    this.blit(matrixStack, k2, j2, 0, 94, 18, 18);
                    this.blit(matrixStack, k2, j2 + 18 - l1, 18, 112 - l1, 18, l1);
                }
            }

            RenderSystem.disableRescaleNormal();
            RenderSystem.disableBlend();
        }
    }
 
Начинающий
Статус
Оффлайн
Регистрация
9 Июл 2023
Сообщения
76
Реакции[?]
0
Поинты[?]
0
Апдейт скорборда и простой хотбар

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


Rarchik:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Group;
import owner.build.api.Register;
import owner.build.api.settings.imp.Clasp;
import owner.build.starting.events.Event;


@Register(name = "Scoreboard", type = Group.Render)
public class Scoreboard extends Function {

    public Clasp font = new Clasp("Покрывало", true);

    public Scoreboard() { addSettings(font); }

    @Override
    public void onEvent(Event event) {

    }
}

//upd
scoreboard IngameGui


Rarchik:
// func_238447_a_ метод в InGameGui


private void func_238447_a_(MatrixStack p_238447_1_, ScoreObjective p_238447_2_) {
        EventOverlaysRender overlaysRender = new EventOverlaysRender(EventOverlaysRender.OverlayType.SCOREBOARD);
        EventManager.call(overlaysRender);

        if (overlaysRender.isCancel) {
            return;
        }
        Scoreboard scoreboard = p_238447_2_.getScoreboard();
        Collection<Score> collection = scoreboard.getSortedScores(p_238447_2_);
        List<Score> list = collection.stream().filter((p_lambda$renderScoreboard$1_0_) ->
        {
            return p_lambda$renderScoreboard$1_0_.getPlayerName() != null && !p_lambda$renderScoreboard$1_0_.getPlayerName().startsWith("#");
        }).collect(Collectors.toList());

        if (list.size() > 15) {
            collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
        } else {
            collection = list;
        }

        List<Pair<Score, ITextComponent>> list1 = Lists.newArrayListWithCapacity(collection.size());
        ITextComponent itextcomponent = p_238447_2_.getDisplayName();
        int i = this.getFontRenderer().getStringPropertyWidth(itextcomponent);
        int j = i;
        int k = this.getFontRenderer().getStringWidth(": ");

        for (Score score : collection) {
            ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
            ITextComponent itextcomponent1 = ScorePlayerTeam.func_237500_a_(scoreplayerteam, new StringTextComponent(score.getPlayerName()));
            list1.add(Pair.of(score, itextcomponent1));
            j = Math.max(j, this.getFontRenderer().getStringPropertyWidth(itextcomponent1) + k + this.getFontRenderer().getStringWidth(Integer.toString(score.getScorePoints())));
        }

        int i2 = collection.size() * 9;
        int j2 = this.scaledHeight / 2 + i2 / 3;
        int k2 = 3;
        int l2 = this.scaledWidth - j - 3;
        int l = 0;
        int k4 = j2 - l * 9;
        int i1 = this.mc.gameSettings.getTextBackgroundColor(0.3F);
        int j1 = this.mc.gameSettings.getTextBackgroundColor(0.4F);
        for (Pair<Score, ITextComponent> pair : list1) {
            ++l;
            Score score1 = pair.getFirst();
            ITextComponent itextcomponent2 = pair.getSecond();
            String s = TextFormatting.RED + "" + score1.getScorePoints();
            int k1 = j2 - l * 9;
            int l1 = this.scaledWidth - 3 + 2;
            fill(p_238447_1_, l2 - 2, k1, l1, k1 + 9, i1);

            this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent2, (float) l2, (float) k1, -1);
            if (Managment.FUNCTION_MANAGER != null && Managment.FUNCTION_MANAGER.nameProtect.state) {
                this.getFontRenderer().drawString(p_238447_1_, Managment.FUNCTION_MANAGER.nameProtect.patch(s), (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);
            } else
                this.getFontRenderer().drawString(p_238447_1_, s, (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);

            if (l == collection.size()) {

                int blitStandartY = this.scaledHeight - 22;
                int blitItemY = blitStandartY + 3;
                this.setBlitOffset(-90);
                boolean customBoard = Managment.FUNCTION_MANAGER.scoreboard.state;
                if (customBoard) {
                    int firstColor = ColorUtil.getColorStyle(0);
                    int secondColor = ColorUtil.getColorStyle(90);
                    int alpha = (int) (0.1 * 255);
                    int firstColorWithAlpha = ColorUtil.setColorAlpha(firstColor, alpha);
                    int secondColorWithAlpha = ColorUtil.setColorAlpha(secondColor, alpha);

                    if (Managment.FUNCTION_MANAGER.scoreboard.font.get()) {
                        drawShadow(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, firstColorWithAlpha, secondColorWithAlpha, ColorUtil.getColorStyle(0F), ColorUtil.getColorStyle(90F));
                    }
                    BloomHelper.registerRenderCall(() -> RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    )));
                    RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    ));
                }

                fill(p_238447_1_, l2 - 2, k1 - 9 - 1, l1, k1 - 1, j1);
                fill(p_238447_1_, l2 - 2, k1 - 1, l1, k1, i1);
                this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent, (float) (l2 + j / 2 - i / 2), (float) (k1 - 9), -1);
            }
        }
    }

HotBar

Java:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Register;
import owner.build.api.Group;
import owner.build.starting.events.Event;

@Register(name = "HotBar", type = Group.Render)
public class Hotbar extends Function {
    @Override
    public void onEvent(Event event) {

    }
}
inGameGuihotbar


Java:
protected void renderHotbar(float partialTicks, MatrixStack matrixStack) {
        PlayerEntity playerentity = this.getRenderViewPlayer();

        if (playerentity != null) {
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
            this.mc.getTextureManager().bindTexture(WIDGETS_TEX_PATH);
            ItemStack itemstack = playerentity.getHeldItemOffhand();
            HandSide handside = playerentity.getPrimaryHand().opposite();
            int i = this.scaledWidth / 2;
            int j = this.getBlitOffset();
            int k = 182;
            int l = 91;
            int firstColor = ColorUtil.getColorStyle(0);
            int secondColor = ColorUtil.getColorStyle(90);
            boolean customHotbar = Managment.FUNCTION_MANAGER.hotbar.state;
            int blitStandartY = this.scaledHeight - 22;
            int blitItemY = blitStandartY + 3;
            this.setBlitOffset(-90);
            if (customHotbar) {
                {
                    int x = i - 91;
                    int y = blitStandartY;
                    int x2 = 182;
                    int y2 = 22;
                    Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 4, java.awt.Color.WHITE.getRGB());
                    //RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 2, 10, firstColor, secondColor, firstColor, secondColor);
                    //RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 2, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 2.5f, new java.awt.Color(0, 0, 0, 100).getRGB());
                }
                {
                    int x = i - 91 - 1 + playerentity.inventory.currentItem * 20;
                    int y = blitStandartY - 1;
                    int x2 = 24;
                    int y2 = 22;
                    RenderUtil.Render2D.drawShadow(x + 2, y + 2, x2 - 4, y2 - 4, 15, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawGradientRound(x + 2, y + 2, x2 - 4, y2 - 4, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x + 2, y + 2, x2 - 4, y2 - 4, 3, new java.awt.Color(0, 0, 0,100).getRGB());
                }
            } else {
                this.blit(matrixStack, i - 91, blitStandartY, 0, 0, 182, 22);
                this.blit(matrixStack, i - 91 - 1 + playerentity.inventory.currentItem * 20, blitStandartY - 1, 0, 22, 24, 22);
            }

            if (!itemstack.isEmpty()) {
                if (handside == HandSide.LEFT) {
                    if (!customHotbar)
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    else {
                        int x = i - 91 - 28;
                        int y = blitStandartY;
                        int x2 = 20;
                        int y2 = 21;
                        Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 3, java.awt.Color.WHITE.getRGB());
                        RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 1, 7, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 1, 3, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 2.5f, ColorUtil.rgba(0, 0, 0, 100));
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    }
                } else {
                    this.blit(matrixStack, i + 91, blitStandartY - 1, 53, 22, 29, 24);
                }
            }

            this.setBlitOffset(j);
            RenderSystem.enableRescaleNormal();
            RenderSystem.enableBlend();
            RenderSystem.defaultBlendFunc();
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            CustomItems.setRenderOffHand(false);

            for (int i1 = 0; i1 < 9; ++i1) {
                int j1 = i - 90 + i1 * 20 + 2;
                int k1 = blitItemY - 1;
                this.renderHotbarItem(j1, k1, partialTicks, playerentity, playerentity.inventory.mainInventory.get(i1));
            }

            if (!itemstack.isEmpty()) {
                CustomItems.setRenderOffHand(true);
                int i2 = blitItemY - 1;

                if (handside == HandSide.LEFT) {
                    this.renderHotbarItem(i - 91 - 26, i2, partialTicks, playerentity, itemstack);
                } else {
                    this.renderHotbarItem(i + 91 + 10, i2, partialTicks, playerentity, itemstack);
                }

                CustomItems.setRenderOffHand(false);
            }

            if (this.mc.gameSettings.attackIndicator == AttackIndicatorStatus.HOTBAR) {
                float f = this.mc.player.getCooledAttackStrength(0.0F);

                if (f < 1.0F) {
                    int j2 = blitStandartY - 2;
                    int k2 = i + 91 + 6;

                    if (handside == HandSide.RIGHT) {
                        k2 = i - 91 - 22;
                    }

                    this.mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
                    int l1 = (int) (f * 19.0F);
                    RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                    this.blit(matrixStack, k2, j2, 0, 94, 18, 18);
                    this.blit(matrixStack, k2, j2 + 18 - l1, 18, 112 - l1, 18, l1);
                }
            }

            RenderSystem.disableRescaleNormal();
            RenderSystem.disableBlend();
        }
    }
говно код
 
Начинающий
Статус
Оффлайн
Регистрация
8 Май 2023
Сообщения
447
Реакции[?]
5
Поинты[?]
6K
Апдейт скорборда и простой хотбар

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


Rarchik:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Group;
import owner.build.api.Register;
import owner.build.api.settings.imp.Clasp;
import owner.build.starting.events.Event;


@Register(name = "Scoreboard", type = Group.Render)
public class Scoreboard extends Function {

    public Clasp font = new Clasp("Покрывало", true);

    public Scoreboard() { addSettings(font); }

    @Override
    public void onEvent(Event event) {

    }
}

//upd
scoreboard IngameGui


Rarchik:
// func_238447_a_ метод в InGameGui


private void func_238447_a_(MatrixStack p_238447_1_, ScoreObjective p_238447_2_) {
        EventOverlaysRender overlaysRender = new EventOverlaysRender(EventOverlaysRender.OverlayType.SCOREBOARD);
        EventManager.call(overlaysRender);

        if (overlaysRender.isCancel) {
            return;
        }
        Scoreboard scoreboard = p_238447_2_.getScoreboard();
        Collection<Score> collection = scoreboard.getSortedScores(p_238447_2_);
        List<Score> list = collection.stream().filter((p_lambda$renderScoreboard$1_0_) ->
        {
            return p_lambda$renderScoreboard$1_0_.getPlayerName() != null && !p_lambda$renderScoreboard$1_0_.getPlayerName().startsWith("#");
        }).collect(Collectors.toList());

        if (list.size() > 15) {
            collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
        } else {
            collection = list;
        }

        List<Pair<Score, ITextComponent>> list1 = Lists.newArrayListWithCapacity(collection.size());
        ITextComponent itextcomponent = p_238447_2_.getDisplayName();
        int i = this.getFontRenderer().getStringPropertyWidth(itextcomponent);
        int j = i;
        int k = this.getFontRenderer().getStringWidth(": ");

        for (Score score : collection) {
            ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
            ITextComponent itextcomponent1 = ScorePlayerTeam.func_237500_a_(scoreplayerteam, new StringTextComponent(score.getPlayerName()));
            list1.add(Pair.of(score, itextcomponent1));
            j = Math.max(j, this.getFontRenderer().getStringPropertyWidth(itextcomponent1) + k + this.getFontRenderer().getStringWidth(Integer.toString(score.getScorePoints())));
        }

        int i2 = collection.size() * 9;
        int j2 = this.scaledHeight / 2 + i2 / 3;
        int k2 = 3;
        int l2 = this.scaledWidth - j - 3;
        int l = 0;
        int k4 = j2 - l * 9;
        int i1 = this.mc.gameSettings.getTextBackgroundColor(0.3F);
        int j1 = this.mc.gameSettings.getTextBackgroundColor(0.4F);
        for (Pair<Score, ITextComponent> pair : list1) {
            ++l;
            Score score1 = pair.getFirst();
            ITextComponent itextcomponent2 = pair.getSecond();
            String s = TextFormatting.RED + "" + score1.getScorePoints();
            int k1 = j2 - l * 9;
            int l1 = this.scaledWidth - 3 + 2;
            fill(p_238447_1_, l2 - 2, k1, l1, k1 + 9, i1);

            this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent2, (float) l2, (float) k1, -1);
            if (Managment.FUNCTION_MANAGER != null && Managment.FUNCTION_MANAGER.nameProtect.state) {
                this.getFontRenderer().drawString(p_238447_1_, Managment.FUNCTION_MANAGER.nameProtect.patch(s), (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);
            } else
                this.getFontRenderer().drawString(p_238447_1_, s, (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);

            if (l == collection.size()) {

                int blitStandartY = this.scaledHeight - 22;
                int blitItemY = blitStandartY + 3;
                this.setBlitOffset(-90);
                boolean customBoard = Managment.FUNCTION_MANAGER.scoreboard.state;
                if (customBoard) {
                    int firstColor = ColorUtil.getColorStyle(0);
                    int secondColor = ColorUtil.getColorStyle(90);
                    int alpha = (int) (0.1 * 255);
                    int firstColorWithAlpha = ColorUtil.setColorAlpha(firstColor, alpha);
                    int secondColorWithAlpha = ColorUtil.setColorAlpha(secondColor, alpha);

                    if (Managment.FUNCTION_MANAGER.scoreboard.font.get()) {
                        drawShadow(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, firstColorWithAlpha, secondColorWithAlpha, ColorUtil.getColorStyle(0F), ColorUtil.getColorStyle(90F));
                    }
                    BloomHelper.registerRenderCall(() -> RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    )));
                    RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    ));
                }

                fill(p_238447_1_, l2 - 2, k1 - 9 - 1, l1, k1 - 1, j1);
                fill(p_238447_1_, l2 - 2, k1 - 1, l1, k1, i1);
                this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent, (float) (l2 + j / 2 - i / 2), (float) (k1 - 9), -1);
            }
        }
    }

HotBar

Java:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Register;
import owner.build.api.Group;
import owner.build.starting.events.Event;

@Register(name = "HotBar", type = Group.Render)
public class Hotbar extends Function {
    @Override
    public void onEvent(Event event) {

    }
}
inGameGuihotbar


Java:
protected void renderHotbar(float partialTicks, MatrixStack matrixStack) {
        PlayerEntity playerentity = this.getRenderViewPlayer();

        if (playerentity != null) {
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
            this.mc.getTextureManager().bindTexture(WIDGETS_TEX_PATH);
            ItemStack itemstack = playerentity.getHeldItemOffhand();
            HandSide handside = playerentity.getPrimaryHand().opposite();
            int i = this.scaledWidth / 2;
            int j = this.getBlitOffset();
            int k = 182;
            int l = 91;
            int firstColor = ColorUtil.getColorStyle(0);
            int secondColor = ColorUtil.getColorStyle(90);
            boolean customHotbar = Managment.FUNCTION_MANAGER.hotbar.state;
            int blitStandartY = this.scaledHeight - 22;
            int blitItemY = blitStandartY + 3;
            this.setBlitOffset(-90);
            if (customHotbar) {
                {
                    int x = i - 91;
                    int y = blitStandartY;
                    int x2 = 182;
                    int y2 = 22;
                    Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 4, java.awt.Color.WHITE.getRGB());
                    //RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 2, 10, firstColor, secondColor, firstColor, secondColor);
                    //RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 2, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 2.5f, new java.awt.Color(0, 0, 0, 100).getRGB());
                }
                {
                    int x = i - 91 - 1 + playerentity.inventory.currentItem * 20;
                    int y = blitStandartY - 1;
                    int x2 = 24;
                    int y2 = 22;
                    RenderUtil.Render2D.drawShadow(x + 2, y + 2, x2 - 4, y2 - 4, 15, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawGradientRound(x + 2, y + 2, x2 - 4, y2 - 4, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x + 2, y + 2, x2 - 4, y2 - 4, 3, new java.awt.Color(0, 0, 0,100).getRGB());
                }
            } else {
                this.blit(matrixStack, i - 91, blitStandartY, 0, 0, 182, 22);
                this.blit(matrixStack, i - 91 - 1 + playerentity.inventory.currentItem * 20, blitStandartY - 1, 0, 22, 24, 22);
            }

            if (!itemstack.isEmpty()) {
                if (handside == HandSide.LEFT) {
                    if (!customHotbar)
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    else {
                        int x = i - 91 - 28;
                        int y = blitStandartY;
                        int x2 = 20;
                        int y2 = 21;
                        Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 3, java.awt.Color.WHITE.getRGB());
                        RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 1, 7, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 1, 3, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 2.5f, ColorUtil.rgba(0, 0, 0, 100));
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    }
                } else {
                    this.blit(matrixStack, i + 91, blitStandartY - 1, 53, 22, 29, 24);
                }
            }

            this.setBlitOffset(j);
            RenderSystem.enableRescaleNormal();
            RenderSystem.enableBlend();
            RenderSystem.defaultBlendFunc();
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            CustomItems.setRenderOffHand(false);

            for (int i1 = 0; i1 < 9; ++i1) {
                int j1 = i - 90 + i1 * 20 + 2;
                int k1 = blitItemY - 1;
                this.renderHotbarItem(j1, k1, partialTicks, playerentity, playerentity.inventory.mainInventory.get(i1));
            }

            if (!itemstack.isEmpty()) {
                CustomItems.setRenderOffHand(true);
                int i2 = blitItemY - 1;

                if (handside == HandSide.LEFT) {
                    this.renderHotbarItem(i - 91 - 26, i2, partialTicks, playerentity, itemstack);
                } else {
                    this.renderHotbarItem(i + 91 + 10, i2, partialTicks, playerentity, itemstack);
                }

                CustomItems.setRenderOffHand(false);
            }

            if (this.mc.gameSettings.attackIndicator == AttackIndicatorStatus.HOTBAR) {
                float f = this.mc.player.getCooledAttackStrength(0.0F);

                if (f < 1.0F) {
                    int j2 = blitStandartY - 2;
                    int k2 = i + 91 + 6;

                    if (handside == HandSide.RIGHT) {
                        k2 = i - 91 - 22;
                    }

                    this.mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
                    int l1 = (int) (f * 19.0F);
                    RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                    this.blit(matrixStack, k2, j2, 0, 94, 18, 18);
                    this.blit(matrixStack, k2, j2 + 18 - l1, 18, 112 - l1, 18, l1);
                }
            }

            RenderSystem.disableRescaleNormal();
            RenderSystem.disableBlend();
        }
    }
Ема ты экспу запаганил
 
Забаненный
Статус
Оффлайн
Регистрация
29 Дек 2023
Сообщения
138
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Забаненный
Статус
Оффлайн
Регистрация
29 Дек 2023
Сообщения
138
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
3 Май 2023
Сообщения
438
Реакции[?]
2
Поинты[?]
2K
Забаненный
Статус
Оффлайн
Регистрация
29 Дек 2023
Сообщения
138
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Забаненный
Статус
Оффлайн
Регистрация
24 Фев 2024
Сообщения
2
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
пастер выписал что-то, а ниче что там только пару строк добавлено))) Эти методы уже существуют в них просто добавлены модули))

отличное кликгуи, сделай лучше
тоюсть переписанное гуи с темы на юг красивое по твоему?
 
Начинающий
Статус
Оффлайн
Регистрация
20 Дек 2023
Сообщения
126
Реакции[?]
0
Поинты[?]
0
Апдейт скорборда и простой хотбар

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


Rarchik:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Group;
import owner.build.api.Register;
import owner.build.api.settings.imp.Clasp;
import owner.build.starting.events.Event;


@Register(name = "Scoreboard", type = Group.Render)
public class Scoreboard extends Function {

    public Clasp font = new Clasp("Покрывало", true);

    public Scoreboard() { addSettings(font); }

    @Override
    public void onEvent(Event event) {

    }
}

//upd
scoreboard IngameGui


Rarchik:
// func_238447_a_ метод в InGameGui


private void func_238447_a_(MatrixStack p_238447_1_, ScoreObjective p_238447_2_) {
        EventOverlaysRender overlaysRender = new EventOverlaysRender(EventOverlaysRender.OverlayType.SCOREBOARD);
        EventManager.call(overlaysRender);

        if (overlaysRender.isCancel) {
            return;
        }
        Scoreboard scoreboard = p_238447_2_.getScoreboard();
        Collection<Score> collection = scoreboard.getSortedScores(p_238447_2_);
        List<Score> list = collection.stream().filter((p_lambda$renderScoreboard$1_0_) ->
        {
            return p_lambda$renderScoreboard$1_0_.getPlayerName() != null && !p_lambda$renderScoreboard$1_0_.getPlayerName().startsWith("#");
        }).collect(Collectors.toList());

        if (list.size() > 15) {
            collection = Lists.newArrayList(Iterables.skip(list, collection.size() - 15));
        } else {
            collection = list;
        }

        List<Pair<Score, ITextComponent>> list1 = Lists.newArrayListWithCapacity(collection.size());
        ITextComponent itextcomponent = p_238447_2_.getDisplayName();
        int i = this.getFontRenderer().getStringPropertyWidth(itextcomponent);
        int j = i;
        int k = this.getFontRenderer().getStringWidth(": ");

        for (Score score : collection) {
            ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(score.getPlayerName());
            ITextComponent itextcomponent1 = ScorePlayerTeam.func_237500_a_(scoreplayerteam, new StringTextComponent(score.getPlayerName()));
            list1.add(Pair.of(score, itextcomponent1));
            j = Math.max(j, this.getFontRenderer().getStringPropertyWidth(itextcomponent1) + k + this.getFontRenderer().getStringWidth(Integer.toString(score.getScorePoints())));
        }

        int i2 = collection.size() * 9;
        int j2 = this.scaledHeight / 2 + i2 / 3;
        int k2 = 3;
        int l2 = this.scaledWidth - j - 3;
        int l = 0;
        int k4 = j2 - l * 9;
        int i1 = this.mc.gameSettings.getTextBackgroundColor(0.3F);
        int j1 = this.mc.gameSettings.getTextBackgroundColor(0.4F);
        for (Pair<Score, ITextComponent> pair : list1) {
            ++l;
            Score score1 = pair.getFirst();
            ITextComponent itextcomponent2 = pair.getSecond();
            String s = TextFormatting.RED + "" + score1.getScorePoints();
            int k1 = j2 - l * 9;
            int l1 = this.scaledWidth - 3 + 2;
            fill(p_238447_1_, l2 - 2, k1, l1, k1 + 9, i1);

            this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent2, (float) l2, (float) k1, -1);
            if (Managment.FUNCTION_MANAGER != null && Managment.FUNCTION_MANAGER.nameProtect.state) {
                this.getFontRenderer().drawString(p_238447_1_, Managment.FUNCTION_MANAGER.nameProtect.patch(s), (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);
            } else
                this.getFontRenderer().drawString(p_238447_1_, s, (float) (l1 - this.getFontRenderer().getStringWidth(s)), (float) k1, -1);

            if (l == collection.size()) {

                int blitStandartY = this.scaledHeight - 22;
                int blitItemY = blitStandartY + 3;
                this.setBlitOffset(-90);
                boolean customBoard = Managment.FUNCTION_MANAGER.scoreboard.state;
                if (customBoard) {
                    int firstColor = ColorUtil.getColorStyle(0);
                    int secondColor = ColorUtil.getColorStyle(90);
                    int alpha = (int) (0.1 * 255);
                    int firstColorWithAlpha = ColorUtil.setColorAlpha(firstColor, alpha);
                    int secondColorWithAlpha = ColorUtil.setColorAlpha(secondColor, alpha);

                    if (Managment.FUNCTION_MANAGER.scoreboard.font.get()) {
                        drawShadow(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, firstColorWithAlpha, secondColorWithAlpha, ColorUtil.getColorStyle(0F), ColorUtil.getColorStyle(90F));
                    }
                    BloomHelper.registerRenderCall(() -> RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    )));
                    RenderUtil.Render2D.drawRoundOutline(l2 - 2, k1 - 10, scaledWidth - l2, i2 + 10, 2, 1, 1, new Vector4i(
                            ColorUtil.getColorStyle(270)
                    ));
                }

                fill(p_238447_1_, l2 - 2, k1 - 9 - 1, l1, k1 - 1, j1);
                fill(p_238447_1_, l2 - 2, k1 - 1, l1, k1, i1);
                this.getFontRenderer().func_243248_b(p_238447_1_, itextcomponent, (float) (l2 + j / 2 - i / 2), (float) (k1 - 9), -1);
            }
        }
    }

HotBar

Java:
package owner.build.modules.impl.render;

import owner.build.api.Function;
import owner.build.api.Register;
import owner.build.api.Group;
import owner.build.starting.events.Event;

@Register(name = "HotBar", type = Group.Render)
public class Hotbar extends Function {
    @Override
    public void onEvent(Event event) {

    }
}
inGameGuihotbar


Java:
protected void renderHotbar(float partialTicks, MatrixStack matrixStack) {
        PlayerEntity playerentity = this.getRenderViewPlayer();

        if (playerentity != null) {
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
            this.mc.getTextureManager().bindTexture(WIDGETS_TEX_PATH);
            ItemStack itemstack = playerentity.getHeldItemOffhand();
            HandSide handside = playerentity.getPrimaryHand().opposite();
            int i = this.scaledWidth / 2;
            int j = this.getBlitOffset();
            int k = 182;
            int l = 91;
            int firstColor = ColorUtil.getColorStyle(0);
            int secondColor = ColorUtil.getColorStyle(90);
            boolean customHotbar = Managment.FUNCTION_MANAGER.hotbar.state;
            int blitStandartY = this.scaledHeight - 22;
            int blitItemY = blitStandartY + 3;
            this.setBlitOffset(-90);
            if (customHotbar) {
                {
                    int x = i - 91;
                    int y = blitStandartY;
                    int x2 = 182;
                    int y2 = 22;
                    Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 4, java.awt.Color.WHITE.getRGB());
                    //RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 2, 10, firstColor, secondColor, firstColor, secondColor);
                    //RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 2, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 2, 2.5f, new java.awt.Color(0, 0, 0, 100).getRGB());
                }
                {
                    int x = i - 91 - 1 + playerentity.inventory.currentItem * 20;
                    int y = blitStandartY - 1;
                    int x2 = 24;
                    int y2 = 22;
                    RenderUtil.Render2D.drawShadow(x + 2, y + 2, x2 - 4, y2 - 4, 15, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawGradientRound(x + 2, y + 2, x2 - 4, y2 - 4, 3, firstColor, secondColor, firstColor, secondColor);
                    RenderUtil.Render2D.drawRoundedRect(x + 2, y + 2, x2 - 4, y2 - 4, 3, new java.awt.Color(0, 0, 0,100).getRGB());
                }
            } else {
                this.blit(matrixStack, i - 91, blitStandartY, 0, 0, 182, 22);
                this.blit(matrixStack, i - 91 - 1 + playerentity.inventory.currentItem * 20, blitStandartY - 1, 0, 22, 24, 22);
            }

            if (!itemstack.isEmpty()) {
                if (handside == HandSide.LEFT) {
                    if (!customHotbar)
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    else {
                        int x = i - 91 - 28;
                        int y = blitStandartY;
                        int x2 = 20;
                        int y2 = 21;
                        Runnable round = () -> RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 3, java.awt.Color.WHITE.getRGB());
                        RenderUtil.Render2D.drawShadow(x, y, x2, y2 - 1, 7, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawGradientRound(x, y, x2, y2 - 1, 3, firstColor, secondColor, firstColor, secondColor);
                        RenderUtil.Render2D.drawRoundedRect(x, y, x2, y2 - 1, 2.5f, ColorUtil.rgba(0, 0, 0, 100));
                        this.blit(matrixStack, i - 91 - 29, blitStandartY - 1, 24, 22, 29, 24);
                    }
                } else {
                    this.blit(matrixStack, i + 91, blitStandartY - 1, 53, 22, 29, 24);
                }
            }

            this.setBlitOffset(j);
            RenderSystem.enableRescaleNormal();
            RenderSystem.enableBlend();
            RenderSystem.defaultBlendFunc();
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            CustomItems.setRenderOffHand(false);

            for (int i1 = 0; i1 < 9; ++i1) {
                int j1 = i - 90 + i1 * 20 + 2;
                int k1 = blitItemY - 1;
                this.renderHotbarItem(j1, k1, partialTicks, playerentity, playerentity.inventory.mainInventory.get(i1));
            }

            if (!itemstack.isEmpty()) {
                CustomItems.setRenderOffHand(true);
                int i2 = blitItemY - 1;

                if (handside == HandSide.LEFT) {
                    this.renderHotbarItem(i - 91 - 26, i2, partialTicks, playerentity, itemstack);
                } else {
                    this.renderHotbarItem(i + 91 + 10, i2, partialTicks, playerentity, itemstack);
                }

                CustomItems.setRenderOffHand(false);
            }

            if (this.mc.gameSettings.attackIndicator == AttackIndicatorStatus.HOTBAR) {
                float f = this.mc.player.getCooledAttackStrength(0.0F);

                if (f < 1.0F) {
                    int j2 = blitStandartY - 2;
                    int k2 = i + 91 + 6;

                    if (handside == HandSide.RIGHT) {
                        k2 = i - 91 - 22;
                    }

                    this.mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
                    int l1 = (int) (f * 19.0F);
                    RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                    this.blit(matrixStack, k2, j2, 0, 94, 18, 18);
                    this.blit(matrixStack, k2, j2 + 18 - l1, 18, 112 - l1, 18, l1);
                }
            }

            RenderSystem.disableRescaleNormal();
            RenderSystem.disableBlend();
        }
    }
Зачётно!
 
Сверху Снизу