Исходник NameTags mcp 1.16.5 (only 16 java)

Начинающий
Статус
Оффлайн
Регистрация
10 Сен 2022
Сообщения
158
Реакции[?]
2
Поинты[?]
2K

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

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

Спасибо!

так сливаю вам наме таги пользуйтесь

name tags
Java:
    public static TextFormatting getHealthColor(float health) {
        if (health <= 4)
            return TextFormatting.RED;
        else if (health <= 8)
            return TextFormatting.GOLD;
        else if (health <= 12)
            return TextFormatting.YELLOW;
        else if (health <= 16)
            return TextFormatting.DARK_GREEN;
        else
            return TextFormatting.GREEN;
    }

    private ITextComponent func_238524_a_(Entity entity, ITextComponent displayName) {
        return entity.isSpectator() ? displayName.deepCopy().mergeStyle(TextFormatting.ITALIC) : displayName;
    }

    public ITextComponent getDisplayName(NetworkPlayerInfo p_200262_1_) {
        return p_200262_1_.getDisplayName() != null ? this.func_238524_a_(p_200262_1_, p_200262_1_.getDisplayName().deepCopy()) : this.func_238524_a_(p_200262_1_, ScorePlayerTeam.func_237500_a_(p_200262_1_.getPlayerTeam(), new StringTextComponent(p_200262_1_.getGameProfile().getName())));
    }

    private ITextComponent func_238524_a_(NetworkPlayerInfo playerInfo, ITextComponent displayName) {
        return displayName;
    }

    public void draw(boolean blur) {
        if (Minecraft.getInstance().world == null) return;
        Iterator<Entity> var1 = Minecraft.getInstance().world.getAllEntities().iterator();
        Font font = Fonts.MANROPE_BOLD.get(12);
        Font otherFont = Fonts.MANROPE_BOLD.get(12);
        while (true) {
            LivingEntity player;
            double[] vec;
            double[] marker = new double[0];

            do {
                Entity e;
                do {
                    do {
                        if (!var1.hasNext()) {
                            return;
                        }

                        e = (Entity) var1.next();
                    } while (!(e instanceof PlayerEntity || e == Aura.target));
                } while ((e == mc.player));

                player = (LivingEntity) e;
                double x2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosX, player.getPosX());
                double y2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosY, player.getPosY());
                double z2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosZ, player.getPosZ());

                vec = RenderUtil.worldToScreen(x2, y2 + player.getHeight() + 0.4f, z2);
                marker = RenderUtil.worldToScreen(x2, y2 + 1.5D, z2);
            } while (vec == null || marker == null);
            float dst = Math.min(mc.player.getDistance(player) / 45, 0.5f);
            String health = "§a";
            if (player.getHealth() < 13.0F && player.getHealth() > 7.0F) {
                health = "§6";
            } else if (player.getHealth() < 7.0F) {
                health = "§c";
            }
            {
                NetworkPlayerInfo networkPlayerInfo = null;
                if (player instanceof PlayerEntity playerEntity) {
                    networkPlayerInfo = mc.player.connection.getPlayerInfo(playerEntity.getUniqueID());
                }


                String displayName = player.getDisplayName().getString();
                String[] allM = displayName.split(" ");
                String donate = "";
                String name = player.getScoreboardName();
                if (allM.length > 1) {
                    donate = allM[0];
                    name = allM[1];
                    if (donate.toLowerCase().contains("dragon")) {
                        donate = TextFormatting.LIGHT_PURPLE + donate;
                    }
                    if (donate.toLowerCase().contains("imperator")) {
                        donate = TextFormatting.RED + donate;
                    }
                    if (donate.toLowerCase().contains("magister")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("overlord")) {
                        donate = TextFormatting.BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("avenger")) {
                        donate = TextFormatting.GREEN + donate;
                    }
                    if (donate.toLowerCase().contains("titan")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("hero")) {
                        donate = TextFormatting.DARK_BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("helper")) {
                        donate = TextFormatting.GOLD + donate;
                    } else if (donate.toLowerCase().contains("moder")) {
                        donate = TextFormatting.BLUE + donate;
                    } else if (donate.toLowerCase().contains("yt")) {
                        donate = TextFormatting.RED + donate;
                    } else if (donate.toLowerCase().contains("admin")) {
                        donate = TextFormatting.DARK_RED + donate;
                    } else if (donate.toLowerCase().contains("мл.сотрудник")) {
                        donate = TextFormatting.YELLOW + donate;
                    } else if (donate.toLowerCase().contains("сотрудник")) {
                        donate = TextFormatting.DARK_RED + donate;
                    }
                    donate += " ";
                }

                if (displayName == null) return;
                String title = donate + TextFormatting.WHITE + " " + name + " " + String.format("[" + TextFormatting.RED + player.getHealth() + TextFormatting.WHITE + "]");

                String titleWithout = ((nova.friendManager.isFriend(name)) || player.getScoreboardName().equals("fireborne") ?
                        TextFormatting.WHITE + "[" + TextFormatting.GREEN + "F" + TextFormatting.WHITE + "]" : "") + " " + donate + name + " " + player.getHealth();

                int ipb = 0;
                for (ITextComponent s : player.getDisplayName().getSiblings()) {
                    for (ITextComponent s1 : s.getSiblings()) {
                        ipb += font.getWidth(s1.getString());
                    }
                    ipb += font.getWidth("i");
                }
                String name123 = donate + TextFormatting.GRAY + " " + name + " " + TextFormatting.WHITE + "[" + TextFormatting.RED + (int) player.getHealth() + TextFormatting.WHITE + "]";
                int width = font.getWidth(name123);


                GL11.glPushMatrix();

                GL11.glTranslatef((float) vec[0], (float) vec[1], 0.0F);

                GL11.glScaled(1, 1, 1);

                GL11.glTranslatef((float) (-vec[0]) - (float) (width / 2), (float) (-vec[1]), 0.0F);
                float val = 0.8f;
                float ip = 0;

                try {
                    RenderUtil.drawRect(vec[0] - 4, vec[1] - 2, font.getWidth(name123) + 4, font.getHeight() + 4, new Color(0, 0, 0, 150));
                    font.draw(name123, (float) vec[0] + ip - 2, (float) vec[1], -1);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                float posY = (float) (vec[1] - 3);
                float posX = (float) (vec[0] + width / 2);
                float maxOffsetY = (font.getHeight() + 3);
                final java.util.List<ItemStack> stacks = new java.util.ArrayList<>();

                stacks.add(player.getHeldItemMainhand());

                stacks.add(player.getHeldItemOffhand());

                player.getArmorInventoryList().forEach(stacks::add);

                stacks.removeIf(w -> w.getItem() instanceof AirItem);
                int totalSize = stacks.size() * 10;

                maxOffsetY += 12;
                int iterable = 0;
                for (ItemStack stack : stacks) {
                    if (stack != null) {
                        RenderHelper.enableStandardItemLighting();
                        drawItemStack(stack, posX + iterable * 20 - totalSize + 2,
                                posY - maxOffsetY + 1, null, false);
                        RenderHelper.disableStandardItemLighting();
                        iterable++;
                        java.util.ArrayList<String> lines = new java.util.ArrayList<>();
                        buildEnchantments(lines, stack);

                        int i = 0;
                        for (String s : lines) {
                            otherFont.draw(s,
                                    posX +
                                            iterable * 20 - totalSize - 18,
                                    (float) posY - (maxOffsetY) - (7) - (i * 7),
                                    new Color(200, 200, 200, 255).getRGB());
                            i++;
                        }
                    }
                }
                GL11.glPopMatrix();
            }
        }
    }

    public void drawItemStack(ItemStack stack, double x, double y, String altText, boolean withoutOverlay) {

        GL11.glPushMatrix();
        GL11.glScalef(-0.01f * -200, -0.01f * -200, -0.01f * -200);
        GL11.glPushMatrix();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GlStateManager.scaled(0.5, 0.5, 0.5);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        mc.getItemRenderer().renderItemIntoGUI(stack, (int) x, (int) y);

        String count = "";
        if (stack.getCount() > 1)
        {
            count = stack.getCount() + "";
        }
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) x, (int) y, count);
        RenderHelper.disableStandardItemLighting();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GL11.glDisable(GL11.GL_DEPTH_TEST);
    }
    public static void buildEnchantments(java.util.ArrayList<String> list, ItemStack stack) {
        Item item = stack.getItem();
        int protection = EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack);
        int thorns = EnchantmentHelper.getEnchantmentLevel(Enchantments.THORNS, stack);
        int unbreaking = EnchantmentHelper.getEnchantmentLevel(Enchantments.UNBREAKING, stack);
        int mending = EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, stack);
        int feather = EnchantmentHelper.getEnchantmentLevel(Enchantments.FEATHER_FALLING, stack);
        int depth = EnchantmentHelper.getEnchantmentLevel(Enchantments.DEPTH_STRIDER, stack);
        int vanishing_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.VANISHING_CURSE, stack);
        int binding_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.BINDING_CURSE, stack);
        int sweeping = EnchantmentHelper.getEnchantmentLevel(Enchantments.SWEEPING, stack);
        int sharpness = EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, stack);
        int looting = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, stack);
        int infinity = EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack);
        int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
        int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
        int flame = EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack);
        int knockback = EnchantmentHelper.getEnchantmentLevel(Enchantments.KNOCKBACK, stack);
        int fireAspect = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_ASPECT, stack);
        int efficiency = EnchantmentHelper.getEnchantmentLevel(Enchantments.EFFICIENCY, stack);
        int silktouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack);
        int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
        int fireprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_PROTECTION, stack);
        int blastprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.BLAST_PROTECTION, stack);

        if (item instanceof AxeItem) {
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof ArmorItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (fireprot > 0) {
                list.add("Ог" + fireprot);
            }
            if (blastprot > 0) {
                list.add("Cп" + blastprot);
            }
            if (depth > 0) {
                list.add("Гл" + depth);
            }
            if (feather > 0) {
                list.add("Пе" + feather);
            }
            if (protection > 0) {
                list.add("За" + protection);
            }
            if (thorns > 0) {
                list.add("Ши" + thorns);
            }
            if (mending > 0) {
                list.add("По");
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof BowItem) {
            if (vanishing_curse > 0) {
                list.add("§cут");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (infinity > 0) {
                list.add("Бе" + infinity);
            }
            if (power > 0) {
                list.add("Си" + power);
            }
            if (punch > 0) {
                list.add("От" + punch);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (flame > 0) {
                list.add("По" + flame);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof SwordItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (looting > 0) {
                list.add("До" + looting);
            }
            if (binding_curse > 0) {
                list.add("§cНе");
            }
            if (sweeping > 0) {
                list.add("По" + sweeping);
            }
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (knockback > 0) {
                list.add("От" + knockback);
            }
            if (fireAspect > 0) {
                list.add("За" + fireAspect);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("Men ");
            }
        }
        if (item instanceof ToolItem) {
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (vanishing_curse > 0) {
                list.add("Ва ");
            }
            if (binding_curse > 0) {
                list.add("Би ");
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (silktouch > 0) {
                list.add("Ше" + silktouch);
            }
            if (fortune > 0) {
                list.add("Уд" + fortune);
            }
        }
    }

    public static void scale() {
        float n = (Minecraft.getInstance().gameSettings.smoothCamera ? 2.0f : 1F);
        RenderSystem.scaled(n, n, n);
    }
для того чтобы они рендерились вам нужны BossHealthRenderEvent ниже они

Java:
public final class BossHealthRenderEvent implements Event {
    private final float partialTicks;
}
а теперь что бы точно всё работало нужно их инцелизировать заходим в Ingamegui и мщем renderIngameGui и в в нём ищем !this.mc.gameSettings.hideGUI
именно с ! потом перед this.mc.getProfiler().startSection("bossHealth"); прописываем EventManager.call(new BossHealthRenderEvent(partialTicks)); и всё они работают теперьь походу вам нужен World to screen вот вам он ниже

Код:
    public static double[] worldToScreen(double x, double y, double z) {
        if (Minecraft.getInstance().currentScreen != null && !(Minecraft.getInstance().currentScreen instanceof ChatScreen) && (Minecraft.getInstance().currentScreen == null)) {
            return null;
        } else {
            try {
                Vector3d camera_pos = Minecraft.getInstance().getRenderManager().info.getProjectedView();
                Quaternion camera_rotation_conj = Minecraft.getInstance().getRenderManager().getCameraOrientation().copy();
                camera_rotation_conj.conjugate();
                Vector3f result3f = new Vector3f((float) (camera_pos.x - x), (float) (camera_pos.y - y), (float) (camera_pos.z - z));
                result3f.transform(camera_rotation_conj);
                GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
                Method method = null;
                Method[] var11 = GameRenderer.class.getDeclaredMethods();
                int var12 = var11.length;

                for (int var13 = 0; var13 < var12; ++var13) {
                    Method m = var11[var13];
                    if (m.getParameterCount() == 3 && m.getParameterTypes()[2] == Boolean.TYPE && m.getParameterTypes()[1] == Float.TYPE && m.getParameterTypes()[0] == ActiveRenderInfo.class && m.getReturnType() == Double.TYPE) {
                        method = m;
                    }
                }

                method.setAccessible(true);
                float fov = ((Double) method.invoke(gameRenderer, Minecraft.getInstance().getRenderManager().info, 1, true)).floatValue();
                float half_height = (float) Minecraft.getInstance().getMainWindow().getScaledHeight() / 2.0F;
                float scale_factor = half_height / (result3f.getZ() * (float) Math.tan(Math.toRadians((double) (fov / 2.0F))));
                if (result3f.getZ() < 0.0F) {
                    return new double[]{(double) (-result3f.getX() * scale_factor + (float) (Minecraft.getInstance().getMainWindow().getScaledWidth() / 2)), (double) ((float) (Minecraft.getInstance().getMainWindow().getScaledHeight() / 2) - result3f.getY() * scale_factor)};
                }
            } catch (Exception var15) {
                var15.printStackTrace();
            }

            return null;
        }
    }
если будут какието вопросы или у вас какието ошибки пишите в дс neonuarov

ss:
1695065833127.png
 
Начинающий
Статус
Оффлайн
Регистрация
11 Май 2022
Сообщения
70
Реакции[?]
10
Поинты[?]
10K
как дать бы подзатыльник за такой код, чтоб с табуретки упал нахуй
 
minced client
Read Only
Статус
Оффлайн
Регистрация
8 Май 2022
Сообщения
616
Реакции[?]
61
Поинты[?]
2K
так сливаю вам наме таги пользуйтесь

name tags
Java:
    public static TextFormatting getHealthColor(float health) {
        if (health <= 4)
            return TextFormatting.RED;
        else if (health <= 8)
            return TextFormatting.GOLD;
        else if (health <= 12)
            return TextFormatting.YELLOW;
        else if (health <= 16)
            return TextFormatting.DARK_GREEN;
        else
            return TextFormatting.GREEN;
    }

    private ITextComponent func_238524_a_(Entity entity, ITextComponent displayName) {
        return entity.isSpectator() ? displayName.deepCopy().mergeStyle(TextFormatting.ITALIC) : displayName;
    }

    public ITextComponent getDisplayName(NetworkPlayerInfo p_200262_1_) {
        return p_200262_1_.getDisplayName() != null ? this.func_238524_a_(p_200262_1_, p_200262_1_.getDisplayName().deepCopy()) : this.func_238524_a_(p_200262_1_, ScorePlayerTeam.func_237500_a_(p_200262_1_.getPlayerTeam(), new StringTextComponent(p_200262_1_.getGameProfile().getName())));
    }

    private ITextComponent func_238524_a_(NetworkPlayerInfo playerInfo, ITextComponent displayName) {
        return displayName;
    }

    public void draw(boolean blur) {
        if (Minecraft.getInstance().world == null) return;
        Iterator<Entity> var1 = Minecraft.getInstance().world.getAllEntities().iterator();
        Font font = Fonts.MANROPE_BOLD.get(12);
        Font otherFont = Fonts.MANROPE_BOLD.get(12);
        while (true) {
            LivingEntity player;
            double[] vec;
            double[] marker = new double[0];

            do {
                Entity e;
                do {
                    do {
                        if (!var1.hasNext()) {
                            return;
                        }

                        e = (Entity) var1.next();
                    } while (!(e instanceof PlayerEntity || e == Aura.target));
                } while ((e == mc.player));

                player = (LivingEntity) e;
                double x2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosX, player.getPosX());
                double y2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosY, player.getPosY());
                double z2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosZ, player.getPosZ());

                vec = RenderUtil.worldToScreen(x2, y2 + player.getHeight() + 0.4f, z2);
                marker = RenderUtil.worldToScreen(x2, y2 + 1.5D, z2);
            } while (vec == null || marker == null);
            float dst = Math.min(mc.player.getDistance(player) / 45, 0.5f);
            String health = "§a";
            if (player.getHealth() < 13.0F && player.getHealth() > 7.0F) {
                health = "§6";
            } else if (player.getHealth() < 7.0F) {
                health = "§c";
            }
            {
                NetworkPlayerInfo networkPlayerInfo = null;
                if (player instanceof PlayerEntity playerEntity) {
                    networkPlayerInfo = mc.player.connection.getPlayerInfo(playerEntity.getUniqueID());
                }


                String displayName = player.getDisplayName().getString();
                String[] allM = displayName.split(" ");
                String donate = "";
                String name = player.getScoreboardName();
                if (allM.length > 1) {
                    donate = allM[0];
                    name = allM[1];
                    if (donate.toLowerCase().contains("dragon")) {
                        donate = TextFormatting.LIGHT_PURPLE + donate;
                    }
                    if (donate.toLowerCase().contains("imperator")) {
                        donate = TextFormatting.RED + donate;
                    }
                    if (donate.toLowerCase().contains("magister")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("overlord")) {
                        donate = TextFormatting.BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("avenger")) {
                        donate = TextFormatting.GREEN + donate;
                    }
                    if (donate.toLowerCase().contains("titan")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("hero")) {
                        donate = TextFormatting.DARK_BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("helper")) {
                        donate = TextFormatting.GOLD + donate;
                    } else if (donate.toLowerCase().contains("moder")) {
                        donate = TextFormatting.BLUE + donate;
                    } else if (donate.toLowerCase().contains("yt")) {
                        donate = TextFormatting.RED + donate;
                    } else if (donate.toLowerCase().contains("admin")) {
                        donate = TextFormatting.DARK_RED + donate;
                    } else if (donate.toLowerCase().contains("мл.сотрудник")) {
                        donate = TextFormatting.YELLOW + donate;
                    } else if (donate.toLowerCase().contains("сотрудник")) {
                        donate = TextFormatting.DARK_RED + donate;
                    }
                    donate += " ";
                }

                if (displayName == null) return;
                String title = donate + TextFormatting.WHITE + " " + name + " " + String.format("[" + TextFormatting.RED + player.getHealth() + TextFormatting.WHITE + "]");

                String titleWithout = ((nova.friendManager.isFriend(name)) || player.getScoreboardName().equals("fireborne") ?
                        TextFormatting.WHITE + "[" + TextFormatting.GREEN + "F" + TextFormatting.WHITE + "]" : "") + " " + donate + name + " " + player.getHealth();

                int ipb = 0;
                for (ITextComponent s : player.getDisplayName().getSiblings()) {
                    for (ITextComponent s1 : s.getSiblings()) {
                        ipb += font.getWidth(s1.getString());
                    }
                    ipb += font.getWidth("i");
                }
                String name123 = donate + TextFormatting.GRAY + " " + name + " " + TextFormatting.WHITE + "[" + TextFormatting.RED + (int) player.getHealth() + TextFormatting.WHITE + "]";
                int width = font.getWidth(name123);


                GL11.glPushMatrix();

                GL11.glTranslatef((float) vec[0], (float) vec[1], 0.0F);

                GL11.glScaled(1, 1, 1);

                GL11.glTranslatef((float) (-vec[0]) - (float) (width / 2), (float) (-vec[1]), 0.0F);
                float val = 0.8f;
                float ip = 0;

                try {
                    RenderUtil.drawRect(vec[0] - 4, vec[1] - 2, font.getWidth(name123) + 4, font.getHeight() + 4, new Color(0, 0, 0, 150));
                    font.draw(name123, (float) vec[0] + ip - 2, (float) vec[1], -1);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                float posY = (float) (vec[1] - 3);
                float posX = (float) (vec[0] + width / 2);
                float maxOffsetY = (font.getHeight() + 3);
                final java.util.List<ItemStack> stacks = new java.util.ArrayList<>();

                stacks.add(player.getHeldItemMainhand());

                stacks.add(player.getHeldItemOffhand());

                player.getArmorInventoryList().forEach(stacks::add);

                stacks.removeIf(w -> w.getItem() instanceof AirItem);
                int totalSize = stacks.size() * 10;

                maxOffsetY += 12;
                int iterable = 0;
                for (ItemStack stack : stacks) {
                    if (stack != null) {
                        RenderHelper.enableStandardItemLighting();
                        drawItemStack(stack, posX + iterable * 20 - totalSize + 2,
                                posY - maxOffsetY + 1, null, false);
                        RenderHelper.disableStandardItemLighting();
                        iterable++;
                        java.util.ArrayList<String> lines = new java.util.ArrayList<>();
                        buildEnchantments(lines, stack);

                        int i = 0;
                        for (String s : lines) {
                            otherFont.draw(s,
                                    posX +
                                            iterable * 20 - totalSize - 18,
                                    (float) posY - (maxOffsetY) - (7) - (i * 7),
                                    new Color(200, 200, 200, 255).getRGB());
                            i++;
                        }
                    }
                }
                GL11.glPopMatrix();
            }
        }
    }

    public void drawItemStack(ItemStack stack, double x, double y, String altText, boolean withoutOverlay) {

        GL11.glPushMatrix();
        GL11.glScalef(-0.01f * -200, -0.01f * -200, -0.01f * -200);
        GL11.glPushMatrix();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GlStateManager.scaled(0.5, 0.5, 0.5);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        mc.getItemRenderer().renderItemIntoGUI(stack, (int) x, (int) y);

        String count = "";
        if (stack.getCount() > 1)
        {
            count = stack.getCount() + "";
        }
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) x, (int) y, count);
        RenderHelper.disableStandardItemLighting();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GL11.glDisable(GL11.GL_DEPTH_TEST);
    }
    public static void buildEnchantments(java.util.ArrayList<String> list, ItemStack stack) {
        Item item = stack.getItem();
        int protection = EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack);
        int thorns = EnchantmentHelper.getEnchantmentLevel(Enchantments.THORNS, stack);
        int unbreaking = EnchantmentHelper.getEnchantmentLevel(Enchantments.UNBREAKING, stack);
        int mending = EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, stack);
        int feather = EnchantmentHelper.getEnchantmentLevel(Enchantments.FEATHER_FALLING, stack);
        int depth = EnchantmentHelper.getEnchantmentLevel(Enchantments.DEPTH_STRIDER, stack);
        int vanishing_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.VANISHING_CURSE, stack);
        int binding_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.BINDING_CURSE, stack);
        int sweeping = EnchantmentHelper.getEnchantmentLevel(Enchantments.SWEEPING, stack);
        int sharpness = EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, stack);
        int looting = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, stack);
        int infinity = EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack);
        int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
        int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
        int flame = EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack);
        int knockback = EnchantmentHelper.getEnchantmentLevel(Enchantments.KNOCKBACK, stack);
        int fireAspect = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_ASPECT, stack);
        int efficiency = EnchantmentHelper.getEnchantmentLevel(Enchantments.EFFICIENCY, stack);
        int silktouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack);
        int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
        int fireprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_PROTECTION, stack);
        int blastprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.BLAST_PROTECTION, stack);

        if (item instanceof AxeItem) {
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof ArmorItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (fireprot > 0) {
                list.add("Ог" + fireprot);
            }
            if (blastprot > 0) {
                list.add("Cп" + blastprot);
            }
            if (depth > 0) {
                list.add("Гл" + depth);
            }
            if (feather > 0) {
                list.add("Пе" + feather);
            }
            if (protection > 0) {
                list.add("За" + protection);
            }
            if (thorns > 0) {
                list.add("Ши" + thorns);
            }
            if (mending > 0) {
                list.add("По");
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof BowItem) {
            if (vanishing_curse > 0) {
                list.add("§cут");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (infinity > 0) {
                list.add("Бе" + infinity);
            }
            if (power > 0) {
                list.add("Си" + power);
            }
            if (punch > 0) {
                list.add("От" + punch);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (flame > 0) {
                list.add("По" + flame);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof SwordItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (looting > 0) {
                list.add("До" + looting);
            }
            if (binding_curse > 0) {
                list.add("§cНе");
            }
            if (sweeping > 0) {
                list.add("По" + sweeping);
            }
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (knockback > 0) {
                list.add("От" + knockback);
            }
            if (fireAspect > 0) {
                list.add("За" + fireAspect);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("Men ");
            }
        }
        if (item instanceof ToolItem) {
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (vanishing_curse > 0) {
                list.add("Ва ");
            }
            if (binding_curse > 0) {
                list.add("Би ");
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (silktouch > 0) {
                list.add("Ше" + silktouch);
            }
            if (fortune > 0) {
                list.add("Уд" + fortune);
            }
        }
    }

    public static void scale() {
        float n = (Minecraft.getInstance().gameSettings.smoothCamera ? 2.0f : 1F);
        RenderSystem.scaled(n, n, n);
    }
для того чтобы они рендерились вам нужны BossHealthRenderEvent ниже они

Java:
public final class BossHealthRenderEvent implements Event {
    private final float partialTicks;
}
а теперь что бы точно всё работало нужно их инцелизировать заходим в Ingamegui и мщем renderIngameGui и в в нём ищем !this.mc.gameSettings.hideGUI
именно с ! потом перед this.mc.getProfiler().startSection("bossHealth"); прописываем EventManager.call(new BossHealthRenderEvent(partialTicks)); и всё они работают теперьь походу вам нужен World to screen вот вам он ниже

Код:
    public static double[] worldToScreen(double x, double y, double z) {
        if (Minecraft.getInstance().currentScreen != null && !(Minecraft.getInstance().currentScreen instanceof ChatScreen) && (Minecraft.getInstance().currentScreen == null)) {
            return null;
        } else {
            try {
                Vector3d camera_pos = Minecraft.getInstance().getRenderManager().info.getProjectedView();
                Quaternion camera_rotation_conj = Minecraft.getInstance().getRenderManager().getCameraOrientation().copy();
                camera_rotation_conj.conjugate();
                Vector3f result3f = new Vector3f((float) (camera_pos.x - x), (float) (camera_pos.y - y), (float) (camera_pos.z - z));
                result3f.transform(camera_rotation_conj);
                GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
                Method method = null;
                Method[] var11 = GameRenderer.class.getDeclaredMethods();
                int var12 = var11.length;

                for (int var13 = 0; var13 < var12; ++var13) {
                    Method m = var11[var13];
                    if (m.getParameterCount() == 3 && m.getParameterTypes()[2] == Boolean.TYPE && m.getParameterTypes()[1] == Float.TYPE && m.getParameterTypes()[0] == ActiveRenderInfo.class && m.getReturnType() == Double.TYPE) {
                        method = m;
                    }
                }

                method.setAccessible(true);
                float fov = ((Double) method.invoke(gameRenderer, Minecraft.getInstance().getRenderManager().info, 1, true)).floatValue();
                float half_height = (float) Minecraft.getInstance().getMainWindow().getScaledHeight() / 2.0F;
                float scale_factor = half_height / (result3f.getZ() * (float) Math.tan(Math.toRadians((double) (fov / 2.0F))));
                if (result3f.getZ() < 0.0F) {
                    return new double[]{(double) (-result3f.getX() * scale_factor + (float) (Minecraft.getInstance().getMainWindow().getScaledWidth() / 2)), (double) ((float) (Minecraft.getInstance().getMainWindow().getScaledHeight() / 2) - result3f.getY() * scale_factor)};
                }
            } catch (Exception var15) {
                var15.printStackTrace();
            }

            return null;
        }
    }
если будут какието вопросы или у вас какието ошибки пишите в дс neonuarov

ss:
Посмотреть вложение 259159
с новы слил, умница, еще бы сказал, что сам писал. 🤡
 
Начинающий
Статус
Оффлайн
Регистрация
10 Сен 2022
Сообщения
158
Реакции[?]
2
Поинты[?]
2K
эксперт в майнкрафт апи
Пользователь
Статус
Оффлайн
Регистрация
8 Сен 2023
Сообщения
255
Реакции[?]
115
Поинты[?]
15K
так сливаю вам наме таги пользуйтесь

name tags
Java:
    public static TextFormatting getHealthColor(float health) {
        if (health <= 4)
            return TextFormatting.RED;
        else if (health <= 8)
            return TextFormatting.GOLD;
        else if (health <= 12)
            return TextFormatting.YELLOW;
        else if (health <= 16)
            return TextFormatting.DARK_GREEN;
        else
            return TextFormatting.GREEN;
    }

    private ITextComponent func_238524_a_(Entity entity, ITextComponent displayName) {
        return entity.isSpectator() ? displayName.deepCopy().mergeStyle(TextFormatting.ITALIC) : displayName;
    }

    public ITextComponent getDisplayName(NetworkPlayerInfo p_200262_1_) {
        return p_200262_1_.getDisplayName() != null ? this.func_238524_a_(p_200262_1_, p_200262_1_.getDisplayName().deepCopy()) : this.func_238524_a_(p_200262_1_, ScorePlayerTeam.func_237500_a_(p_200262_1_.getPlayerTeam(), new StringTextComponent(p_200262_1_.getGameProfile().getName())));
    }

    private ITextComponent func_238524_a_(NetworkPlayerInfo playerInfo, ITextComponent displayName) {
        return displayName;
    }

    public void draw(boolean blur) {
        if (Minecraft.getInstance().world == null) return;
        Iterator<Entity> var1 = Minecraft.getInstance().world.getAllEntities().iterator();
        Font font = Fonts.MANROPE_BOLD.get(12);
        Font otherFont = Fonts.MANROPE_BOLD.get(12);
        while (true) {
            LivingEntity player;
            double[] vec;
            double[] marker = new double[0];

            do {
                Entity e;
                do {
                    do {
                        if (!var1.hasNext()) {
                            return;
                        }

                        e = (Entity) var1.next();
                    } while (!(e instanceof PlayerEntity || e == Aura.target));
                } while ((e == mc.player));

                player = (LivingEntity) e;
                double x2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosX, player.getPosX());
                double y2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosY, player.getPosY());
                double z2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosZ, player.getPosZ());

                vec = RenderUtil.worldToScreen(x2, y2 + player.getHeight() + 0.4f, z2);
                marker = RenderUtil.worldToScreen(x2, y2 + 1.5D, z2);
            } while (vec == null || marker == null);
            float dst = Math.min(mc.player.getDistance(player) / 45, 0.5f);
            String health = "§a";
            if (player.getHealth() < 13.0F && player.getHealth() > 7.0F) {
                health = "§6";
            } else if (player.getHealth() < 7.0F) {
                health = "§c";
            }
            {
                NetworkPlayerInfo networkPlayerInfo = null;
                if (player instanceof PlayerEntity playerEntity) {
                    networkPlayerInfo = mc.player.connection.getPlayerInfo(playerEntity.getUniqueID());
                }


                String displayName = player.getDisplayName().getString();
                String[] allM = displayName.split(" ");
                String donate = "";
                String name = player.getScoreboardName();
                if (allM.length > 1) {
                    donate = allM[0];
                    name = allM[1];
                    if (donate.toLowerCase().contains("dragon")) {
                        donate = TextFormatting.LIGHT_PURPLE + donate;
                    }
                    if (donate.toLowerCase().contains("imperator")) {
                        donate = TextFormatting.RED + donate;
                    }
                    if (donate.toLowerCase().contains("magister")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("overlord")) {
                        donate = TextFormatting.BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("avenger")) {
                        donate = TextFormatting.GREEN + donate;
                    }
                    if (donate.toLowerCase().contains("titan")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("hero")) {
                        donate = TextFormatting.DARK_BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("helper")) {
                        donate = TextFormatting.GOLD + donate;
                    } else if (donate.toLowerCase().contains("moder")) {
                        donate = TextFormatting.BLUE + donate;
                    } else if (donate.toLowerCase().contains("yt")) {
                        donate = TextFormatting.RED + donate;
                    } else if (donate.toLowerCase().contains("admin")) {
                        donate = TextFormatting.DARK_RED + donate;
                    } else if (donate.toLowerCase().contains("мл.сотрудник")) {
                        donate = TextFormatting.YELLOW + donate;
                    } else if (donate.toLowerCase().contains("сотрудник")) {
                        donate = TextFormatting.DARK_RED + donate;
                    }
                    donate += " ";
                }

                if (displayName == null) return;
                String title = donate + TextFormatting.WHITE + " " + name + " " + String.format("[" + TextFormatting.RED + player.getHealth() + TextFormatting.WHITE + "]");

                String titleWithout = ((nova.friendManager.isFriend(name)) || player.getScoreboardName().equals("fireborne") ?
                        TextFormatting.WHITE + "[" + TextFormatting.GREEN + "F" + TextFormatting.WHITE + "]" : "") + " " + donate + name + " " + player.getHealth();

                int ipb = 0;
                for (ITextComponent s : player.getDisplayName().getSiblings()) {
                    for (ITextComponent s1 : s.getSiblings()) {
                        ipb += font.getWidth(s1.getString());
                    }
                    ipb += font.getWidth("i");
                }
                String name123 = donate + TextFormatting.GRAY + " " + name + " " + TextFormatting.WHITE + "[" + TextFormatting.RED + (int) player.getHealth() + TextFormatting.WHITE + "]";
                int width = font.getWidth(name123);


                GL11.glPushMatrix();

                GL11.glTranslatef((float) vec[0], (float) vec[1], 0.0F);

                GL11.glScaled(1, 1, 1);

                GL11.glTranslatef((float) (-vec[0]) - (float) (width / 2), (float) (-vec[1]), 0.0F);
                float val = 0.8f;
                float ip = 0;

                try {
                    RenderUtil.drawRect(vec[0] - 4, vec[1] - 2, font.getWidth(name123) + 4, font.getHeight() + 4, new Color(0, 0, 0, 150));
                    font.draw(name123, (float) vec[0] + ip - 2, (float) vec[1], -1);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                float posY = (float) (vec[1] - 3);
                float posX = (float) (vec[0] + width / 2);
                float maxOffsetY = (font.getHeight() + 3);
                final java.util.List<ItemStack> stacks = new java.util.ArrayList<>();

                stacks.add(player.getHeldItemMainhand());

                stacks.add(player.getHeldItemOffhand());

                player.getArmorInventoryList().forEach(stacks::add);

                stacks.removeIf(w -> w.getItem() instanceof AirItem);
                int totalSize = stacks.size() * 10;

                maxOffsetY += 12;
                int iterable = 0;
                for (ItemStack stack : stacks) {
                    if (stack != null) {
                        RenderHelper.enableStandardItemLighting();
                        drawItemStack(stack, posX + iterable * 20 - totalSize + 2,
                                posY - maxOffsetY + 1, null, false);
                        RenderHelper.disableStandardItemLighting();
                        iterable++;
                        java.util.ArrayList<String> lines = new java.util.ArrayList<>();
                        buildEnchantments(lines, stack);

                        int i = 0;
                        for (String s : lines) {
                            otherFont.draw(s,
                                    posX +
                                            iterable * 20 - totalSize - 18,
                                    (float) posY - (maxOffsetY) - (7) - (i * 7),
                                    new Color(200, 200, 200, 255).getRGB());
                            i++;
                        }
                    }
                }
                GL11.glPopMatrix();
            }
        }
    }

    public void drawItemStack(ItemStack stack, double x, double y, String altText, boolean withoutOverlay) {

        GL11.glPushMatrix();
        GL11.glScalef(-0.01f * -200, -0.01f * -200, -0.01f * -200);
        GL11.glPushMatrix();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GlStateManager.scaled(0.5, 0.5, 0.5);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        mc.getItemRenderer().renderItemIntoGUI(stack, (int) x, (int) y);

        String count = "";
        if (stack.getCount() > 1)
        {
            count = stack.getCount() + "";
        }
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) x, (int) y, count);
        RenderHelper.disableStandardItemLighting();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GL11.glDisable(GL11.GL_DEPTH_TEST);
    }
    public static void buildEnchantments(java.util.ArrayList<String> list, ItemStack stack) {
        Item item = stack.getItem();
        int protection = EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack);
        int thorns = EnchantmentHelper.getEnchantmentLevel(Enchantments.THORNS, stack);
        int unbreaking = EnchantmentHelper.getEnchantmentLevel(Enchantments.UNBREAKING, stack);
        int mending = EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, stack);
        int feather = EnchantmentHelper.getEnchantmentLevel(Enchantments.FEATHER_FALLING, stack);
        int depth = EnchantmentHelper.getEnchantmentLevel(Enchantments.DEPTH_STRIDER, stack);
        int vanishing_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.VANISHING_CURSE, stack);
        int binding_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.BINDING_CURSE, stack);
        int sweeping = EnchantmentHelper.getEnchantmentLevel(Enchantments.SWEEPING, stack);
        int sharpness = EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, stack);
        int looting = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, stack);
        int infinity = EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack);
        int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
        int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
        int flame = EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack);
        int knockback = EnchantmentHelper.getEnchantmentLevel(Enchantments.KNOCKBACK, stack);
        int fireAspect = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_ASPECT, stack);
        int efficiency = EnchantmentHelper.getEnchantmentLevel(Enchantments.EFFICIENCY, stack);
        int silktouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack);
        int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
        int fireprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_PROTECTION, stack);
        int blastprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.BLAST_PROTECTION, stack);

        if (item instanceof AxeItem) {
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof ArmorItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (fireprot > 0) {
                list.add("Ог" + fireprot);
            }
            if (blastprot > 0) {
                list.add("Cп" + blastprot);
            }
            if (depth > 0) {
                list.add("Гл" + depth);
            }
            if (feather > 0) {
                list.add("Пе" + feather);
            }
            if (protection > 0) {
                list.add("За" + protection);
            }
            if (thorns > 0) {
                list.add("Ши" + thorns);
            }
            if (mending > 0) {
                list.add("По");
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof BowItem) {
            if (vanishing_curse > 0) {
                list.add("§cут");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (infinity > 0) {
                list.add("Бе" + infinity);
            }
            if (power > 0) {
                list.add("Си" + power);
            }
            if (punch > 0) {
                list.add("От" + punch);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (flame > 0) {
                list.add("По" + flame);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof SwordItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (looting > 0) {
                list.add("До" + looting);
            }
            if (binding_curse > 0) {
                list.add("§cНе");
            }
            if (sweeping > 0) {
                list.add("По" + sweeping);
            }
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (knockback > 0) {
                list.add("От" + knockback);
            }
            if (fireAspect > 0) {
                list.add("За" + fireAspect);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("Men ");
            }
        }
        if (item instanceof ToolItem) {
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (vanishing_curse > 0) {
                list.add("Ва ");
            }
            if (binding_curse > 0) {
                list.add("Би ");
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (silktouch > 0) {
                list.add("Ше" + silktouch);
            }
            if (fortune > 0) {
                list.add("Уд" + fortune);
            }
        }
    }

    public static void scale() {
        float n = (Minecraft.getInstance().gameSettings.smoothCamera ? 2.0f : 1F);
        RenderSystem.scaled(n, n, n);
    }
для того чтобы они рендерились вам нужны BossHealthRenderEvent ниже они

Java:
public final class BossHealthRenderEvent implements Event {
    private final float partialTicks;
}
а теперь что бы точно всё работало нужно их инцелизировать заходим в Ingamegui и мщем renderIngameGui и в в нём ищем !this.mc.gameSettings.hideGUI
именно с ! потом перед this.mc.getProfiler().startSection("bossHealth"); прописываем EventManager.call(new BossHealthRenderEvent(partialTicks)); и всё они работают теперьь походу вам нужен World to screen вот вам он ниже

Код:
    public static double[] worldToScreen(double x, double y, double z) {
        if (Minecraft.getInstance().currentScreen != null && !(Minecraft.getInstance().currentScreen instanceof ChatScreen) && (Minecraft.getInstance().currentScreen == null)) {
            return null;
        } else {
            try {
                Vector3d camera_pos = Minecraft.getInstance().getRenderManager().info.getProjectedView();
                Quaternion camera_rotation_conj = Minecraft.getInstance().getRenderManager().getCameraOrientation().copy();
                camera_rotation_conj.conjugate();
                Vector3f result3f = new Vector3f((float) (camera_pos.x - x), (float) (camera_pos.y - y), (float) (camera_pos.z - z));
                result3f.transform(camera_rotation_conj);
                GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
                Method method = null;
                Method[] var11 = GameRenderer.class.getDeclaredMethods();
                int var12 = var11.length;

                for (int var13 = 0; var13 < var12; ++var13) {
                    Method m = var11[var13];
                    if (m.getParameterCount() == 3 && m.getParameterTypes()[2] == Boolean.TYPE && m.getParameterTypes()[1] == Float.TYPE && m.getParameterTypes()[0] == ActiveRenderInfo.class && m.getReturnType() == Double.TYPE) {
                        method = m;
                    }
                }

                method.setAccessible(true);
                float fov = ((Double) method.invoke(gameRenderer, Minecraft.getInstance().getRenderManager().info, 1, true)).floatValue();
                float half_height = (float) Minecraft.getInstance().getMainWindow().getScaledHeight() / 2.0F;
                float scale_factor = half_height / (result3f.getZ() * (float) Math.tan(Math.toRadians((double) (fov / 2.0F))));
                if (result3f.getZ() < 0.0F) {
                    return new double[]{(double) (-result3f.getX() * scale_factor + (float) (Minecraft.getInstance().getMainWindow().getScaledWidth() / 2)), (double) ((float) (Minecraft.getInstance().getMainWindow().getScaledHeight() / 2) - result3f.getY() * scale_factor)};
                }
            } catch (Exception var15) {
                var15.printStackTrace();
            }

            return null;
        }
    }
если будут какието вопросы или у вас какието ошибки пишите в дс neonuarov

ss:
Посмотреть вложение 259159
с таким кодом единственное что ты можешь сделать, так это удалить аккаунт на форуме и забыть о нем

w2s ужасен, да и то он из новы :roflanPominki:
while (true) {
LivingEntity player;
double[] vec;
double[] marker = new double[0];

do {
Entity e;
do {
do {
if (!var1.hasNext()) {
return;
}

e = (Entity) var1.next();
} while (!(e instanceof PlayerEntity || e == Aura.target));
} while ((e == mc.player));
String[] allM = displayName.split(" ");
String donate = "";
String name = player.getScoreboardName();
if (allM.length > 1) {
donate = allM[0];
name = allM[1];
if (donate.toLowerCase().contains("dragon")) {
donate = TextFormatting.LIGHT_PURPLE + donate;
}
if (donate.toLowerCase().contains("imperator")) {
donate = TextFormatting.RED + donate;
}
if (donate.toLowerCase().contains("magister")) {
donate = TextFormatting.YELLOW + donate;
}
if (donate.toLowerCase().contains("overlord")) {
donate = TextFormatting.BLUE + donate;
}
if (donate.toLowerCase().contains("avenger")) {
donate = TextFormatting.GREEN + donate;
}
if (donate.toLowerCase().contains("titan")) {
donate = TextFormatting.YELLOW + donate;
}
if (donate.toLowerCase().contains("hero")) {
donate = TextFormatting.DARK_BLUE + donate;
}
if (donate.toLowerCase().contains("helper")) {
donate = TextFormatting.GOLD + donate;
} else if (donate.toLowerCase().contains("moder")) {
donate = TextFormatting.BLUE + donate;
} else if (donate.toLowerCase().contains("yt")) {
donate = TextFormatting.RED + donate;
} else if (donate.toLowerCase().contains("admin")) {
donate = TextFormatting.DARK_RED + donate;
} else if (donate.toLowerCase().contains("мл.сотрудник")) {
donate = TextFormatting.YELLOW + donate;
} else if (donate.toLowerCase().contains("сотрудник")) {
donate = TextFormatting.DARK_RED + donate;
}
donate += " ";
}
тут я просто промолчу

итог: удаляй свою хуету
 
Начинающий
Статус
Оффлайн
Регистрация
14 Ноя 2022
Сообщения
30
Реакции[?]
0
Поинты[?]
0
40, 40, 40 blackout XD
Read Only
Статус
Оффлайн
Регистрация
15 Янв 2020
Сообщения
454
Реакции[?]
228
Поинты[?]
24K
ты че долб*еб? нахуя ты свой дискорд кидаешь, тебе не будут помогать пастить угомонись уже
да, я именно долбаеб, поможешь? Я тебе конфету сегодня принесу, если кое-кто на чайОК позовет))
 
Начинающий
Статус
Оффлайн
Регистрация
31 Авг 2022
Сообщения
364
Реакции[?]
4
Поинты[?]
7K
так сливаю вам наме таги пользуйтесь

name tags
Java:
    public static TextFormatting getHealthColor(float health) {
        if (health <= 4)
            return TextFormatting.RED;
        else if (health <= 8)
            return TextFormatting.GOLD;
        else if (health <= 12)
            return TextFormatting.YELLOW;
        else if (health <= 16)
            return TextFormatting.DARK_GREEN;
        else
            return TextFormatting.GREEN;
    }

    private ITextComponent func_238524_a_(Entity entity, ITextComponent displayName) {
        return entity.isSpectator() ? displayName.deepCopy().mergeStyle(TextFormatting.ITALIC) : displayName;
    }

    public ITextComponent getDisplayName(NetworkPlayerInfo p_200262_1_) {
        return p_200262_1_.getDisplayName() != null ? this.func_238524_a_(p_200262_1_, p_200262_1_.getDisplayName().deepCopy()) : this.func_238524_a_(p_200262_1_, ScorePlayerTeam.func_237500_a_(p_200262_1_.getPlayerTeam(), new StringTextComponent(p_200262_1_.getGameProfile().getName())));
    }

    private ITextComponent func_238524_a_(NetworkPlayerInfo playerInfo, ITextComponent displayName) {
        return displayName;
    }

    public void draw(boolean blur) {
        if (Minecraft.getInstance().world == null) return;
        Iterator<Entity> var1 = Minecraft.getInstance().world.getAllEntities().iterator();
        Font font = Fonts.MANROPE_BOLD.get(12);
        Font otherFont = Fonts.MANROPE_BOLD.get(12);
        while (true) {
            LivingEntity player;
            double[] vec;
            double[] marker = new double[0];

            do {
                Entity e;
                do {
                    do {
                        if (!var1.hasNext()) {
                            return;
                        }

                        e = (Entity) var1.next();
                    } while (!(e instanceof PlayerEntity || e == Aura.target));
                } while ((e == mc.player));

                player = (LivingEntity) e;
                double x2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosX, player.getPosX());
                double y2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosY, player.getPosY());
                double z2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosZ, player.getPosZ());

                vec = RenderUtil.worldToScreen(x2, y2 + player.getHeight() + 0.4f, z2);
                marker = RenderUtil.worldToScreen(x2, y2 + 1.5D, z2);
            } while (vec == null || marker == null);
            float dst = Math.min(mc.player.getDistance(player) / 45, 0.5f);
            String health = "§a";
            if (player.getHealth() < 13.0F && player.getHealth() > 7.0F) {
                health = "§6";
            } else if (player.getHealth() < 7.0F) {
                health = "§c";
            }
            {
                NetworkPlayerInfo networkPlayerInfo = null;
                if (player instanceof PlayerEntity playerEntity) {
                    networkPlayerInfo = mc.player.connection.getPlayerInfo(playerEntity.getUniqueID());
                }


                String displayName = player.getDisplayName().getString();
                String[] allM = displayName.split(" ");
                String donate = "";
                String name = player.getScoreboardName();
                if (allM.length > 1) {
                    donate = allM[0];
                    name = allM[1];
                    if (donate.toLowerCase().contains("dragon")) {
                        donate = TextFormatting.LIGHT_PURPLE + donate;
                    }
                    if (donate.toLowerCase().contains("imperator")) {
                        donate = TextFormatting.RED + donate;
                    }
                    if (donate.toLowerCase().contains("magister")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("overlord")) {
                        donate = TextFormatting.BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("avenger")) {
                        donate = TextFormatting.GREEN + donate;
                    }
                    if (donate.toLowerCase().contains("titan")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("hero")) {
                        donate = TextFormatting.DARK_BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("helper")) {
                        donate = TextFormatting.GOLD + donate;
                    } else if (donate.toLowerCase().contains("moder")) {
                        donate = TextFormatting.BLUE + donate;
                    } else if (donate.toLowerCase().contains("yt")) {
                        donate = TextFormatting.RED + donate;
                    } else if (donate.toLowerCase().contains("admin")) {
                        donate = TextFormatting.DARK_RED + donate;
                    } else if (donate.toLowerCase().contains("мл.сотрудник")) {
                        donate = TextFormatting.YELLOW + donate;
                    } else if (donate.toLowerCase().contains("сотрудник")) {
                        donate = TextFormatting.DARK_RED + donate;
                    }
                    donate += " ";
                }

                if (displayName == null) return;
                String title = donate + TextFormatting.WHITE + " " + name + " " + String.format("[" + TextFormatting.RED + player.getHealth() + TextFormatting.WHITE + "]");

                String titleWithout = ((nova.friendManager.isFriend(name)) || player.getScoreboardName().equals("fireborne") ?
                        TextFormatting.WHITE + "[" + TextFormatting.GREEN + "F" + TextFormatting.WHITE + "]" : "") + " " + donate + name + " " + player.getHealth();

                int ipb = 0;
                for (ITextComponent s : player.getDisplayName().getSiblings()) {
                    for (ITextComponent s1 : s.getSiblings()) {
                        ipb += font.getWidth(s1.getString());
                    }
                    ipb += font.getWidth("i");
                }
                String name123 = donate + TextFormatting.GRAY + " " + name + " " + TextFormatting.WHITE + "[" + TextFormatting.RED + (int) player.getHealth() + TextFormatting.WHITE + "]";
                int width = font.getWidth(name123);


                GL11.glPushMatrix();

                GL11.glTranslatef((float) vec[0], (float) vec[1], 0.0F);

                GL11.glScaled(1, 1, 1);

                GL11.glTranslatef((float) (-vec[0]) - (float) (width / 2), (float) (-vec[1]), 0.0F);
                float val = 0.8f;
                float ip = 0;

                try {
                    RenderUtil.drawRect(vec[0] - 4, vec[1] - 2, font.getWidth(name123) + 4, font.getHeight() + 4, new Color(0, 0, 0, 150));
                    font.draw(name123, (float) vec[0] + ip - 2, (float) vec[1], -1);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                float posY = (float) (vec[1] - 3);
                float posX = (float) (vec[0] + width / 2);
                float maxOffsetY = (font.getHeight() + 3);
                final java.util.List<ItemStack> stacks = new java.util.ArrayList<>();

                stacks.add(player.getHeldItemMainhand());

                stacks.add(player.getHeldItemOffhand());

                player.getArmorInventoryList().forEach(stacks::add);

                stacks.removeIf(w -> w.getItem() instanceof AirItem);
                int totalSize = stacks.size() * 10;

                maxOffsetY += 12;
                int iterable = 0;
                for (ItemStack stack : stacks) {
                    if (stack != null) {
                        RenderHelper.enableStandardItemLighting();
                        drawItemStack(stack, posX + iterable * 20 - totalSize + 2,
                                posY - maxOffsetY + 1, null, false);
                        RenderHelper.disableStandardItemLighting();
                        iterable++;
                        java.util.ArrayList<String> lines = new java.util.ArrayList<>();
                        buildEnchantments(lines, stack);

                        int i = 0;
                        for (String s : lines) {
                            otherFont.draw(s,
                                    posX +
                                            iterable * 20 - totalSize - 18,
                                    (float) posY - (maxOffsetY) - (7) - (i * 7),
                                    new Color(200, 200, 200, 255).getRGB());
                            i++;
                        }
                    }
                }
                GL11.glPopMatrix();
            }
        }
    }

    public void drawItemStack(ItemStack stack, double x, double y, String altText, boolean withoutOverlay) {

        GL11.glPushMatrix();
        GL11.glScalef(-0.01f * -200, -0.01f * -200, -0.01f * -200);
        GL11.glPushMatrix();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GlStateManager.scaled(0.5, 0.5, 0.5);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        mc.getItemRenderer().renderItemIntoGUI(stack, (int) x, (int) y);

        String count = "";
        if (stack.getCount() > 1)
        {
            count = stack.getCount() + "";
        }
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) x, (int) y, count);
        RenderHelper.disableStandardItemLighting();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GL11.glDisable(GL11.GL_DEPTH_TEST);
    }
    public static void buildEnchantments(java.util.ArrayList<String> list, ItemStack stack) {
        Item item = stack.getItem();
        int protection = EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack);
        int thorns = EnchantmentHelper.getEnchantmentLevel(Enchantments.THORNS, stack);
        int unbreaking = EnchantmentHelper.getEnchantmentLevel(Enchantments.UNBREAKING, stack);
        int mending = EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, stack);
        int feather = EnchantmentHelper.getEnchantmentLevel(Enchantments.FEATHER_FALLING, stack);
        int depth = EnchantmentHelper.getEnchantmentLevel(Enchantments.DEPTH_STRIDER, stack);
        int vanishing_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.VANISHING_CURSE, stack);
        int binding_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.BINDING_CURSE, stack);
        int sweeping = EnchantmentHelper.getEnchantmentLevel(Enchantments.SWEEPING, stack);
        int sharpness = EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, stack);
        int looting = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, stack);
        int infinity = EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack);
        int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
        int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
        int flame = EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack);
        int knockback = EnchantmentHelper.getEnchantmentLevel(Enchantments.KNOCKBACK, stack);
        int fireAspect = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_ASPECT, stack);
        int efficiency = EnchantmentHelper.getEnchantmentLevel(Enchantments.EFFICIENCY, stack);
        int silktouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack);
        int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
        int fireprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_PROTECTION, stack);
        int blastprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.BLAST_PROTECTION, stack);

        if (item instanceof AxeItem) {
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof ArmorItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (fireprot > 0) {
                list.add("Ог" + fireprot);
            }
            if (blastprot > 0) {
                list.add("Cп" + blastprot);
            }
            if (depth > 0) {
                list.add("Гл" + depth);
            }
            if (feather > 0) {
                list.add("Пе" + feather);
            }
            if (protection > 0) {
                list.add("За" + protection);
            }
            if (thorns > 0) {
                list.add("Ши" + thorns);
            }
            if (mending > 0) {
                list.add("По");
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof BowItem) {
            if (vanishing_curse > 0) {
                list.add("§cут");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (infinity > 0) {
                list.add("Бе" + infinity);
            }
            if (power > 0) {
                list.add("Си" + power);
            }
            if (punch > 0) {
                list.add("От" + punch);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (flame > 0) {
                list.add("По" + flame);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof SwordItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (looting > 0) {
                list.add("До" + looting);
            }
            if (binding_curse > 0) {
                list.add("§cНе");
            }
            if (sweeping > 0) {
                list.add("По" + sweeping);
            }
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (knockback > 0) {
                list.add("От" + knockback);
            }
            if (fireAspect > 0) {
                list.add("За" + fireAspect);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("Men ");
            }
        }
        if (item instanceof ToolItem) {
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (vanishing_curse > 0) {
                list.add("Ва ");
            }
            if (binding_curse > 0) {
                list.add("Би ");
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (silktouch > 0) {
                list.add("Ше" + silktouch);
            }
            if (fortune > 0) {
                list.add("Уд" + fortune);
            }
        }
    }

    public static void scale() {
        float n = (Minecraft.getInstance().gameSettings.smoothCamera ? 2.0f : 1F);
        RenderSystem.scaled(n, n, n);
    }
для того чтобы они рендерились вам нужны BossHealthRenderEvent ниже они

Java:
public final class BossHealthRenderEvent implements Event {
    private final float partialTicks;
}
а теперь что бы точно всё работало нужно их инцелизировать заходим в Ingamegui и мщем renderIngameGui и в в нём ищем !this.mc.gameSettings.hideGUI
именно с ! потом перед this.mc.getProfiler().startSection("bossHealth"); прописываем EventManager.call(new BossHealthRenderEvent(partialTicks)); и всё они работают теперьь походу вам нужен World to screen вот вам он ниже

Код:
    public static double[] worldToScreen(double x, double y, double z) {
        if (Minecraft.getInstance().currentScreen != null && !(Minecraft.getInstance().currentScreen instanceof ChatScreen) && (Minecraft.getInstance().currentScreen == null)) {
            return null;
        } else {
            try {
                Vector3d camera_pos = Minecraft.getInstance().getRenderManager().info.getProjectedView();
                Quaternion camera_rotation_conj = Minecraft.getInstance().getRenderManager().getCameraOrientation().copy();
                camera_rotation_conj.conjugate();
                Vector3f result3f = new Vector3f((float) (camera_pos.x - x), (float) (camera_pos.y - y), (float) (camera_pos.z - z));
                result3f.transform(camera_rotation_conj);
                GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
                Method method = null;
                Method[] var11 = GameRenderer.class.getDeclaredMethods();
                int var12 = var11.length;

                for (int var13 = 0; var13 < var12; ++var13) {
                    Method m = var11[var13];
                    if (m.getParameterCount() == 3 && m.getParameterTypes()[2] == Boolean.TYPE && m.getParameterTypes()[1] == Float.TYPE && m.getParameterTypes()[0] == ActiveRenderInfo.class && m.getReturnType() == Double.TYPE) {
                        method = m;
                    }
                }

                method.setAccessible(true);
                float fov = ((Double) method.invoke(gameRenderer, Minecraft.getInstance().getRenderManager().info, 1, true)).floatValue();
                float half_height = (float) Minecraft.getInstance().getMainWindow().getScaledHeight() / 2.0F;
                float scale_factor = half_height / (result3f.getZ() * (float) Math.tan(Math.toRadians((double) (fov / 2.0F))));
                if (result3f.getZ() < 0.0F) {
                    return new double[]{(double) (-result3f.getX() * scale_factor + (float) (Minecraft.getInstance().getMainWindow().getScaledWidth() / 2)), (double) ((float) (Minecraft.getInstance().getMainWindow().getScaledHeight() / 2) - result3f.getY() * scale_factor)};
                }
            } catch (Exception var15) {
                var15.printStackTrace();
            }

            return null;
        }
    }
если будут какието вопросы или у вас какието ошибки пишите в дс neonuarov

ss:
Посмотреть вложение 259159
Гений в 1.16.5 уже у всех рендорится в 3 д
 
PoC Life
Пользователь
Статус
Оффлайн
Регистрация
22 Авг 2022
Сообщения
331
Реакции[?]
47
Поинты[?]
37K
Начинающий
Статус
Оффлайн
Регистрация
11 Фев 2023
Сообщения
208
Реакции[?]
0
Поинты[?]
2K
так сливаю вам наме таги пользуйтесь

name tags
Java:
    public static TextFormatting getHealthColor(float health) {
        if (health <= 4)
            return TextFormatting.RED;
        else if (health <= 8)
            return TextFormatting.GOLD;
        else if (health <= 12)
            return TextFormatting.YELLOW;
        else if (health <= 16)
            return TextFormatting.DARK_GREEN;
        else
            return TextFormatting.GREEN;
    }

    private ITextComponent func_238524_a_(Entity entity, ITextComponent displayName) {
        return entity.isSpectator() ? displayName.deepCopy().mergeStyle(TextFormatting.ITALIC) : displayName;
    }

    public ITextComponent getDisplayName(NetworkPlayerInfo p_200262_1_) {
        return p_200262_1_.getDisplayName() != null ? this.func_238524_a_(p_200262_1_, p_200262_1_.getDisplayName().deepCopy()) : this.func_238524_a_(p_200262_1_, ScorePlayerTeam.func_237500_a_(p_200262_1_.getPlayerTeam(), new StringTextComponent(p_200262_1_.getGameProfile().getName())));
    }

    private ITextComponent func_238524_a_(NetworkPlayerInfo playerInfo, ITextComponent displayName) {
        return displayName;
    }

    public void draw(boolean blur) {
        if (Minecraft.getInstance().world == null) return;
        Iterator<Entity> var1 = Minecraft.getInstance().world.getAllEntities().iterator();
        Font font = Fonts.MANROPE_BOLD.get(12);
        Font otherFont = Fonts.MANROPE_BOLD.get(12);
        while (true) {
            LivingEntity player;
            double[] vec;
            double[] marker = new double[0];

            do {
                Entity e;
                do {
                    do {
                        if (!var1.hasNext()) {
                            return;
                        }

                        e = (Entity) var1.next();
                    } while (!(e instanceof PlayerEntity || e == Aura.target));
                } while ((e == mc.player));

                player = (LivingEntity) e;
                double x2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosX, player.getPosX());
                double y2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosY, player.getPosY());
                double z2 = RenderUtils.interporate((double) mc.getRenderPartialTicks(), player.lastTickPosZ, player.getPosZ());

                vec = RenderUtil.worldToScreen(x2, y2 + player.getHeight() + 0.4f, z2);
                marker = RenderUtil.worldToScreen(x2, y2 + 1.5D, z2);
            } while (vec == null || marker == null);
            float dst = Math.min(mc.player.getDistance(player) / 45, 0.5f);
            String health = "§a";
            if (player.getHealth() < 13.0F && player.getHealth() > 7.0F) {
                health = "§6";
            } else if (player.getHealth() < 7.0F) {
                health = "§c";
            }
            {
                NetworkPlayerInfo networkPlayerInfo = null;
                if (player instanceof PlayerEntity playerEntity) {
                    networkPlayerInfo = mc.player.connection.getPlayerInfo(playerEntity.getUniqueID());
                }


                String displayName = player.getDisplayName().getString();
                String[] allM = displayName.split(" ");
                String donate = "";
                String name = player.getScoreboardName();
                if (allM.length > 1) {
                    donate = allM[0];
                    name = allM[1];
                    if (donate.toLowerCase().contains("dragon")) {
                        donate = TextFormatting.LIGHT_PURPLE + donate;
                    }
                    if (donate.toLowerCase().contains("imperator")) {
                        donate = TextFormatting.RED + donate;
                    }
                    if (donate.toLowerCase().contains("magister")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("overlord")) {
                        donate = TextFormatting.BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("avenger")) {
                        donate = TextFormatting.GREEN + donate;
                    }
                    if (donate.toLowerCase().contains("titan")) {
                        donate = TextFormatting.YELLOW + donate;
                    }
                    if (donate.toLowerCase().contains("hero")) {
                        donate = TextFormatting.DARK_BLUE + donate;
                    }
                    if (donate.toLowerCase().contains("helper")) {
                        donate = TextFormatting.GOLD + donate;
                    } else if (donate.toLowerCase().contains("moder")) {
                        donate = TextFormatting.BLUE + donate;
                    } else if (donate.toLowerCase().contains("yt")) {
                        donate = TextFormatting.RED + donate;
                    } else if (donate.toLowerCase().contains("admin")) {
                        donate = TextFormatting.DARK_RED + donate;
                    } else if (donate.toLowerCase().contains("мл.сотрудник")) {
                        donate = TextFormatting.YELLOW + donate;
                    } else if (donate.toLowerCase().contains("сотрудник")) {
                        donate = TextFormatting.DARK_RED + donate;
                    }
                    donate += " ";
                }

                if (displayName == null) return;
                String title = donate + TextFormatting.WHITE + " " + name + " " + String.format("[" + TextFormatting.RED + player.getHealth() + TextFormatting.WHITE + "]");

                String titleWithout = ((nova.friendManager.isFriend(name)) || player.getScoreboardName().equals("fireborne") ?
                        TextFormatting.WHITE + "[" + TextFormatting.GREEN + "F" + TextFormatting.WHITE + "]" : "") + " " + donate + name + " " + player.getHealth();

                int ipb = 0;
                for (ITextComponent s : player.getDisplayName().getSiblings()) {
                    for (ITextComponent s1 : s.getSiblings()) {
                        ipb += font.getWidth(s1.getString());
                    }
                    ipb += font.getWidth("i");
                }
                String name123 = donate + TextFormatting.GRAY + " " + name + " " + TextFormatting.WHITE + "[" + TextFormatting.RED + (int) player.getHealth() + TextFormatting.WHITE + "]";
                int width = font.getWidth(name123);


                GL11.glPushMatrix();

                GL11.glTranslatef((float) vec[0], (float) vec[1], 0.0F);

                GL11.glScaled(1, 1, 1);

                GL11.glTranslatef((float) (-vec[0]) - (float) (width / 2), (float) (-vec[1]), 0.0F);
                float val = 0.8f;
                float ip = 0;

                try {
                    RenderUtil.drawRect(vec[0] - 4, vec[1] - 2, font.getWidth(name123) + 4, font.getHeight() + 4, new Color(0, 0, 0, 150));
                    font.draw(name123, (float) vec[0] + ip - 2, (float) vec[1], -1);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                float posY = (float) (vec[1] - 3);
                float posX = (float) (vec[0] + width / 2);
                float maxOffsetY = (font.getHeight() + 3);
                final java.util.List<ItemStack> stacks = new java.util.ArrayList<>();

                stacks.add(player.getHeldItemMainhand());

                stacks.add(player.getHeldItemOffhand());

                player.getArmorInventoryList().forEach(stacks::add);

                stacks.removeIf(w -> w.getItem() instanceof AirItem);
                int totalSize = stacks.size() * 10;

                maxOffsetY += 12;
                int iterable = 0;
                for (ItemStack stack : stacks) {
                    if (stack != null) {
                        RenderHelper.enableStandardItemLighting();
                        drawItemStack(stack, posX + iterable * 20 - totalSize + 2,
                                posY - maxOffsetY + 1, null, false);
                        RenderHelper.disableStandardItemLighting();
                        iterable++;
                        java.util.ArrayList<String> lines = new java.util.ArrayList<>();
                        buildEnchantments(lines, stack);

                        int i = 0;
                        for (String s : lines) {
                            otherFont.draw(s,
                                    posX +
                                            iterable * 20 - totalSize - 18,
                                    (float) posY - (maxOffsetY) - (7) - (i * 7),
                                    new Color(200, 200, 200, 255).getRGB());
                            i++;
                        }
                    }
                }
                GL11.glPopMatrix();
            }
        }
    }

    public void drawItemStack(ItemStack stack, double x, double y, String altText, boolean withoutOverlay) {

        GL11.glPushMatrix();
        GL11.glScalef(-0.01f * -200, -0.01f * -200, -0.01f * -200);
        GL11.glPushMatrix();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GlStateManager.scaled(0.5, 0.5, 0.5);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        mc.getItemRenderer().renderItemIntoGUI(stack, (int) x, (int) y);

        String count = "";
        if (stack.getCount() > 1)
        {
            count = stack.getCount() + "";
        }
        mc.getItemRenderer().renderItemOverlayIntoGUI(mc.fontRenderer, stack, (int) x, (int) y, count);
        RenderHelper.disableStandardItemLighting();
        GlStateManager.disableLighting();
        GL11.glPopMatrix();
        GL11.glDisable(GL11.GL_DEPTH_TEST);
    }
    public static void buildEnchantments(java.util.ArrayList<String> list, ItemStack stack) {
        Item item = stack.getItem();
        int protection = EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack);
        int thorns = EnchantmentHelper.getEnchantmentLevel(Enchantments.THORNS, stack);
        int unbreaking = EnchantmentHelper.getEnchantmentLevel(Enchantments.UNBREAKING, stack);
        int mending = EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, stack);
        int feather = EnchantmentHelper.getEnchantmentLevel(Enchantments.FEATHER_FALLING, stack);
        int depth = EnchantmentHelper.getEnchantmentLevel(Enchantments.DEPTH_STRIDER, stack);
        int vanishing_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.VANISHING_CURSE, stack);
        int binding_curse = EnchantmentHelper.getEnchantmentLevel(Enchantments.BINDING_CURSE, stack);
        int sweeping = EnchantmentHelper.getEnchantmentLevel(Enchantments.SWEEPING, stack);
        int sharpness = EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, stack);
        int looting = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, stack);
        int infinity = EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack);
        int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
        int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
        int flame = EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack);
        int knockback = EnchantmentHelper.getEnchantmentLevel(Enchantments.KNOCKBACK, stack);
        int fireAspect = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_ASPECT, stack);
        int efficiency = EnchantmentHelper.getEnchantmentLevel(Enchantments.EFFICIENCY, stack);
        int silktouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack);
        int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
        int fireprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.FIRE_PROTECTION, stack);
        int blastprot = EnchantmentHelper.getEnchantmentLevel(Enchantments.BLAST_PROTECTION, stack);

        if (item instanceof AxeItem) {
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof ArmorItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (fireprot > 0) {
                list.add("Ог" + fireprot);
            }
            if (blastprot > 0) {
                list.add("Cп" + blastprot);
            }
            if (depth > 0) {
                list.add("Гл" + depth);
            }
            if (feather > 0) {
                list.add("Пе" + feather);
            }
            if (protection > 0) {
                list.add("За" + protection);
            }
            if (thorns > 0) {
                list.add("Ши" + thorns);
            }
            if (mending > 0) {
                list.add("По");
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof BowItem) {
            if (vanishing_curse > 0) {
                list.add("§cут");
            }
            if (binding_curse > 0) {
                list.add("§cне ");
            }
            if (infinity > 0) {
                list.add("Бе" + infinity);
            }
            if (power > 0) {
                list.add("Си" + power);
            }
            if (punch > 0) {
                list.add("От" + punch);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (flame > 0) {
                list.add("По" + flame);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
        }
        if (item instanceof SwordItem) {
            if (vanishing_curse > 0) {
                list.add("§cут ");
            }
            if (looting > 0) {
                list.add("До" + looting);
            }
            if (binding_curse > 0) {
                list.add("§cНе");
            }
            if (sweeping > 0) {
                list.add("По" + sweeping);
            }
            if (sharpness > 0) {
                list.add("Ос" + sharpness);
            }
            if (knockback > 0) {
                list.add("От" + knockback);
            }
            if (fireAspect > 0) {
                list.add("За" + fireAspect);
            }
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("Men ");
            }
        }
        if (item instanceof ToolItem) {
            if (unbreaking > 0) {
                list.add("Пр" + unbreaking);
            }
            if (mending > 0) {
                list.add("По ");
            }
            if (vanishing_curse > 0) {
                list.add("Ва ");
            }
            if (binding_curse > 0) {
                list.add("Би ");
            }
            if (efficiency > 0) {
                list.add("Эф" + efficiency);
            }
            if (silktouch > 0) {
                list.add("Ше" + silktouch);
            }
            if (fortune > 0) {
                list.add("Уд" + fortune);
            }
        }
    }

    public static void scale() {
        float n = (Minecraft.getInstance().gameSettings.smoothCamera ? 2.0f : 1F);
        RenderSystem.scaled(n, n, n);
    }
для того чтобы они рендерились вам нужны BossHealthRenderEvent ниже они

Java:
public final class BossHealthRenderEvent implements Event {
    private final float partialTicks;
}
а теперь что бы точно всё работало нужно их инцелизировать заходим в Ingamegui и мщем renderIngameGui и в в нём ищем !this.mc.gameSettings.hideGUI
именно с ! потом перед this.mc.getProfiler().startSection("bossHealth"); прописываем EventManager.call(new BossHealthRenderEvent(partialTicks)); и всё они работают теперьь походу вам нужен World to screen вот вам он ниже

Код:
    public static double[] worldToScreen(double x, double y, double z) {
        if (Minecraft.getInstance().currentScreen != null && !(Minecraft.getInstance().currentScreen instanceof ChatScreen) && (Minecraft.getInstance().currentScreen == null)) {
            return null;
        } else {
            try {
                Vector3d camera_pos = Minecraft.getInstance().getRenderManager().info.getProjectedView();
                Quaternion camera_rotation_conj = Minecraft.getInstance().getRenderManager().getCameraOrientation().copy();
                camera_rotation_conj.conjugate();
                Vector3f result3f = new Vector3f((float) (camera_pos.x - x), (float) (camera_pos.y - y), (float) (camera_pos.z - z));
                result3f.transform(camera_rotation_conj);
                GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
                Method method = null;
                Method[] var11 = GameRenderer.class.getDeclaredMethods();
                int var12 = var11.length;

                for (int var13 = 0; var13 < var12; ++var13) {
                    Method m = var11[var13];
                    if (m.getParameterCount() == 3 && m.getParameterTypes()[2] == Boolean.TYPE && m.getParameterTypes()[1] == Float.TYPE && m.getParameterTypes()[0] == ActiveRenderInfo.class && m.getReturnType() == Double.TYPE) {
                        method = m;
                    }
                }

                method.setAccessible(true);
                float fov = ((Double) method.invoke(gameRenderer, Minecraft.getInstance().getRenderManager().info, 1, true)).floatValue();
                float half_height = (float) Minecraft.getInstance().getMainWindow().getScaledHeight() / 2.0F;
                float scale_factor = half_height / (result3f.getZ() * (float) Math.tan(Math.toRadians((double) (fov / 2.0F))));
                if (result3f.getZ() < 0.0F) {
                    return new double[]{(double) (-result3f.getX() * scale_factor + (float) (Minecraft.getInstance().getMainWindow().getScaledWidth() / 2)), (double) ((float) (Minecraft.getInstance().getMainWindow().getScaledHeight() / 2) - result3f.getY() * scale_factor)};
                }
            } catch (Exception var15) {
                var15.printStackTrace();
            }

            return null;
        }
    }
если будут какието вопросы или у вас какието ошибки пишите в дс neonuarov

ss:
Посмотреть вложение 259159
1695140535543.pngХАХАХАХАХАХАХХАХА БЛЯЯЯТЬ
 
эксперт в майнкрафт апи
Пользователь
Статус
Оффлайн
Регистрация
8 Сен 2023
Сообщения
255
Реакции[?]
115
Поинты[?]
15K
эксперт в майнкрафт апи
Пользователь
Статус
Оффлайн
Регистрация
8 Сен 2023
Сообщения
255
Реакции[?]
115
Поинты[?]
15K
да ты что, не врешь? есть способ еще легче 3д евента открою секрет
причем тут 3д евент если я говорю про w2s, просто с использованием projection и view матриц, и никакую тряску тебе отдельно применять не надо
 
Сверху Снизу