Вопрос Target esp улетает в небеса

Начинающий
Статус
Оффлайн
Регистрация
17 Апр 2023
Сообщения
190
Реакции[?]
2
Поинты[?]
0

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

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

Спасибо!

Когда поворачиваю камерой Target esp улетает в небеса
сс:
1698849528907.png


сам код:
GL11.glPushMatrix();
        this.collectEntities();
        final float partialTicks = e.ticks;
        final RenderManager renderMng = Utility.mc.getRenderManager();
        final EntityRenderer entityRenderer = Utility.mc.entityRenderer;
        final List<Entity> collectedEntities = this.collectedEntities;
        for (final Entity entity : collectedEntities) {
            if (entity instanceof EntityPlayer && RenderUtility.isInViewFrustum(entity)) {
                final double x = MathUtility.interpolate(entity.posX, entity.lastTickPosX, partialTicks);
                final double y = MathUtility.interpolate(entity.posY, entity.lastTickPosY, partialTicks);
                final double z = MathUtility.interpolate(entity.posZ, entity.lastTickPosZ, partialTicks);

                final double width = entity.width / 1.5;
                final double n = entity.height + 0.2f - (entity.isSneaking() ? 0.2f : 0.0f);
                final AxisAlignedBB aabb = new AxisAlignedBB(x - width, y, z - width, x + width, y + n, z + width);
                final Vec3d[] vectors = {new Vec3d(aabb.minX, aabb.minY, aabb.minZ), new Vec3d(aabb.minX, aabb.maxY, aabb.minZ), new Vec3d(aabb.maxX, aabb.minY, aabb.minZ), new Vec3d(aabb.maxX, aabb.maxY, aabb.minZ), new Vec3d(aabb.minX, aabb.minY, aabb.maxZ), new Vec3d(aabb.minX, aabb.maxY, aabb.maxZ), new Vec3d(aabb.maxX, aabb.minY, aabb.maxZ), new Vec3d(aabb.maxX, aabb.maxY, aabb.maxZ)};
                entityRenderer.setupCameraTransform(partialTicks, 0);
                Vector4f position = null;
                for (Vec3d vector : vectors) {
                    vector = this.project2D(2, vector.x - renderMng.viewerPosX, vector.y - renderMng.viewerPosY, vector.z - renderMng.viewerPosZ);
                    if (vector != null && vector.z >= 0.0 && vector.z < 1.0) {
                        if (position == null) {
                            position = new Vector4f((float) vector.x, (float) vector.y, (float) vector.z, 1.0f);
                        }
                        position.x = (float) Math.min(vector.x, position.x);
                        position.y = (float) Math.min(vector.y, position.y);
                        position.z = (float) Math.max(vector.x, position.z);
                        position.w = (float) Math.max(vector.y, position.w);
                    }
                }
                if (position != null) {
                    entityRenderer.setupOverlayRendering(2);
                    double posX = position.x + 50;
                    double posY = position.y;
                    markerPosition.x = MathUtility.lerp(markerPosition.x, position.x, 1F);
                    markerPosition.y = MathUtility.lerp(markerPosition.y, position.y, 1F);
//                    double posX = markerPosition.x + 50;
//                    double posY = markerPosition.y;
                    double endPosX = position.z;
                    double endPosY = position.w;

                    double angle = (float) MathUtility.clamp(0, 30, ((Math.sin(System.currentTimeMillis() / 150D) + 1F) / 2F) * 30);
                    double scale = (float) MathUtility.clamp(0.8, 1, ((Math.sin(System.currentTimeMillis() / 500D) + 1F) / 2F) * 1);
                    double rotate = (float) MathUtility.clamp(0, 360, ((Math.sin(System.currentTimeMillis() / 1000D) + 1F) / 2F) * 360);

                    /*{
                        GlStateManager.pushMatrix();
                        GL11.glTranslatef((float) posX, (float) posY, 0.0F);
//                        GL11.glScaled(scale, scale, 1F);

                        double sc = MathUtility.clamp(0.75F, 1F, (1F - distanceToTarget() / AuraModule.INSTANCE.range.getDoubleValue()));
                        sc = MathUtility.lerp(scale, sc, 0.5F);
//                        GL11.glScaled(sc, sc, sc);
//
                        GL11.glTranslatef((float) (-posX) - (200 / 2F), (float) (-posY), 0.0F);

//                        GLUtils.startRotate((float) markerPosition.x + (200 / 2F), (float) markerPosition.y, (float) (45F - (angle - 15F) + rotate));

                        GlStateManager.enableBlend();
                        GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE);
                        GLUtil.rotate((float) (posX + 100),
                                (float) posY + 200, (float)
                                        (Math.cos
                                                ((System.currentTimeMillis() - Celiaset.deltaTime()) / 200F) * 5), () -> {
//                                    rotateComponent.run();
//                                    rotateComponent2.run();
//                                    rotateComponent3.run();
//                                    rotateComponent4.run();
                                    RenderUtility.drawImage(new ResourceLocation("client/images/triugolnik.png"), posX, posY, 200, 300, HudModule.getColor(5), 1);

                                });
                        GlStateManager.disableBlend();
//                        GLUtils.endRotate();
                        GlStateManager.popMatrix();
//                        RenderUtility.drawRectNotWH(posX - 1.0D, posY, posX + 0.5D, endPosY + 0.5D, HudModule.getColor(5).getRGB());
//                        RenderUtility.drawRectNotWH(posX - 1.0D, posY - 0.5D, endPosX + 0.5D, posY + 0.5D + 0.5D, HudModule.getColor(130).getRGB());
//                        RenderUtility.drawRectNotWH(endPosX - 0.5D - 0.5D, posY, endPosX + 0.5D, endPosY + 0.5D, HudModule.getColor(50).getRGB());
//                        RenderUtility.drawRectNotWH(posX - 1.0D, endPosY - 0.5D - 0.5D, endPosX + 0.5D, endPosY + 0.5D, HudModule.getColor(190).getRGB());
//                        RenderUtility.drawRectNotWH(posX - 0.5D, posY, posX + 0.5D - 0.5D, endPosY, -1);
//                        RenderUtility.drawRectNotWH(posX, endPosY - 0.5D, endPosX, endPosY, -1);
//                        RenderUtility.drawRectNotWH(posX - 0.5D, posY, endPosX, posY + 0.5D, -1);
//                        RenderUtility.drawRectNotWH(endPosX - 0.5D, posY, endPosX, endPosY, -1);
                    }*/


                    {


                        float size = 100;

//                        double angle = (float) MathUtility.clamp(0, 30, ((Math.sin(System.currentTimeMillis() / 150D) + 1F) / 2F) * 30);
//                        double scale = (float) MathUtility.clamp(0.8, 1, ((Math.sin(System.currentTimeMillis() / 500D) + 1F) / 2F) * 1);
//                        double rotate = (float) MathUtility.clamp(0, 360, ((Math.sin(System.currentTimeMillis() / 1000D) + 1F) / 2F) * 360);

                        GlStateManager.pushMatrix();
                        GL11.glTranslatef((float) posX, (float) posY + size, 0.0F);
//                        GL11.glScaled(scale, scale, 1F);

                        double sc = MathUtility.clamp(0.75F, 1F, (1F - distanceToTarget() / AuraModule.INSTANCE.range.getDoubleValue()));
                        sc = MathUtility.lerp(scale, sc, 0.5F);
                        GL11.glScaled(sc, sc, sc);

                        GL11.glTranslatef((float) (-posX) - (size / 2F), (float) (-posY + size), 0.0F);

                        int color = ColorUtility.interpolate(HudModule.getColor(5).getRGB(), new Color(255, 0, 0).getRGB(),
                                (float) Math.sin(((EntityPlayer) entity).hurtTime * (18F * Math.PI / 180F))).intValue();
                        GLUtils.startRotate((float) posX + (size / 2), (float) posY, (float) (45F - (angle - 15F) + rotate));

                        GlStateManager.enableBlend();
                        GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE);
                        RenderUtility.drawImage(new ResourceLocation("client/images/triugolnik2.png"), (float) posX, (float) (posY) - (size / 2), size, size, color, 1);


//                        GLUtil.rotate((float) (posX + 25 + 50),
//                                (float) posY + 25 + 100, (float)
//                                        (Math.cos
//                                                ((System.currentTimeMillis() - Celiaset.deltaTime()) / 200F) * 5), () -> {
//                                    rotateComponent.run();
//                                    rotateComponent2.run();
//                                    rotateComponent3.run();
//                                    rotateComponent4.run();
//                                    RenderUtility.drawImage(new ResourceLocation("client/images/triugolnik2.png"), posX + 25, posY + 75, 50, 50, ((EntityPlayer) entity).hurtTime == 9 ? new Color(255, 0, 0) : HudModule.getColor(5), 1);
//
//                                });


                        GlStateManager.disableBlend();

                        GLUtils.endRotate();
                        GlStateManager.popMatrix();



                    }



                    final EntityLivingBase entityLivingBase = (EntityLivingBase) entity;
                    final double hpPercentage = entityLivingBase.getHealth() / entityLivingBase.getMaxHealth();
                    final double hpHeight2 = (endPosY - posY) * hpPercentage;
                    final double hpHeight3 = (endPosY - posY);
                    double dif = (endPosX - posX) / 2.0D;
                    double textWidth = (Fonts.MCR8.getStringWidth(entityLivingBase.getName()));


                    Utility.mc.entityRenderer.setupOverlayRendering();

                }
            }
        }
        GL11.glPopMatrix();
 
Начинающий
Статус
Оффлайн
Регистрация
30 Авг 2022
Сообщения
188
Реакции[?]
2
Поинты[?]
1K
Когда поворачиваю камерой Target esp улетает в небеса
сс:
Посмотреть вложение 262799


сам код:
GL11.glPushMatrix();
        this.collectEntities();
        final float partialTicks = e.ticks;
        final RenderManager renderMng = Utility.mc.getRenderManager();
        final EntityRenderer entityRenderer = Utility.mc.entityRenderer;
        final List<Entity> collectedEntities = this.collectedEntities;
        for (final Entity entity : collectedEntities) {
            if (entity instanceof EntityPlayer && RenderUtility.isInViewFrustum(entity)) {
                final double x = MathUtility.interpolate(entity.posX, entity.lastTickPosX, partialTicks);
                final double y = MathUtility.interpolate(entity.posY, entity.lastTickPosY, partialTicks);
                final double z = MathUtility.interpolate(entity.posZ, entity.lastTickPosZ, partialTicks);

                final double width = entity.width / 1.5;
                final double n = entity.height + 0.2f - (entity.isSneaking() ? 0.2f : 0.0f);
                final AxisAlignedBB aabb = new AxisAlignedBB(x - width, y, z - width, x + width, y + n, z + width);
                final Vec3d[] vectors = {new Vec3d(aabb.minX, aabb.minY, aabb.minZ), new Vec3d(aabb.minX, aabb.maxY, aabb.minZ), new Vec3d(aabb.maxX, aabb.minY, aabb.minZ), new Vec3d(aabb.maxX, aabb.maxY, aabb.minZ), new Vec3d(aabb.minX, aabb.minY, aabb.maxZ), new Vec3d(aabb.minX, aabb.maxY, aabb.maxZ), new Vec3d(aabb.maxX, aabb.minY, aabb.maxZ), new Vec3d(aabb.maxX, aabb.maxY, aabb.maxZ)};
                entityRenderer.setupCameraTransform(partialTicks, 0);
                Vector4f position = null;
                for (Vec3d vector : vectors) {
                    vector = this.project2D(2, vector.x - renderMng.viewerPosX, vector.y - renderMng.viewerPosY, vector.z - renderMng.viewerPosZ);
                    if (vector != null && vector.z >= 0.0 && vector.z < 1.0) {
                        if (position == null) {
                            position = new Vector4f((float) vector.x, (float) vector.y, (float) vector.z, 1.0f);
                        }
                        position.x = (float) Math.min(vector.x, position.x);
                        position.y = (float) Math.min(vector.y, position.y);
                        position.z = (float) Math.max(vector.x, position.z);
                        position.w = (float) Math.max(vector.y, position.w);
                    }
                }
                if (position != null) {
                    entityRenderer.setupOverlayRendering(2);
                    double posX = position.x + 50;
                    double posY = position.y;
                    markerPosition.x = MathUtility.lerp(markerPosition.x, position.x, 1F);
                    markerPosition.y = MathUtility.lerp(markerPosition.y, position.y, 1F);
//                    double posX = markerPosition.x + 50;
//                    double posY = markerPosition.y;
                    double endPosX = position.z;
                    double endPosY = position.w;

                    double angle = (float) MathUtility.clamp(0, 30, ((Math.sin(System.currentTimeMillis() / 150D) + 1F) / 2F) * 30);
                    double scale = (float) MathUtility.clamp(0.8, 1, ((Math.sin(System.currentTimeMillis() / 500D) + 1F) / 2F) * 1);
                    double rotate = (float) MathUtility.clamp(0, 360, ((Math.sin(System.currentTimeMillis() / 1000D) + 1F) / 2F) * 360);

                    /*{
                        GlStateManager.pushMatrix();
                        GL11.glTranslatef((float) posX, (float) posY, 0.0F);
//                        GL11.glScaled(scale, scale, 1F);

                        double sc = MathUtility.clamp(0.75F, 1F, (1F - distanceToTarget() / AuraModule.INSTANCE.range.getDoubleValue()));
                        sc = MathUtility.lerp(scale, sc, 0.5F);
//                        GL11.glScaled(sc, sc, sc);
//
                        GL11.glTranslatef((float) (-posX) - (200 / 2F), (float) (-posY), 0.0F);

//                        GLUtils.startRotate((float) markerPosition.x + (200 / 2F), (float) markerPosition.y, (float) (45F - (angle - 15F) + rotate));

                        GlStateManager.enableBlend();
                        GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE);
                        GLUtil.rotate((float) (posX + 100),
                                (float) posY + 200, (float)
                                        (Math.cos
                                                ((System.currentTimeMillis() - Celiaset.deltaTime()) / 200F) * 5), () -> {
//                                    rotateComponent.run();
//                                    rotateComponent2.run();
//                                    rotateComponent3.run();
//                                    rotateComponent4.run();
                                    RenderUtility.drawImage(new ResourceLocation("client/images/triugolnik.png"), posX, posY, 200, 300, HudModule.getColor(5), 1);

                                });
                        GlStateManager.disableBlend();
//                        GLUtils.endRotate();
                        GlStateManager.popMatrix();
//                        RenderUtility.drawRectNotWH(posX - 1.0D, posY, posX + 0.5D, endPosY + 0.5D, HudModule.getColor(5).getRGB());
//                        RenderUtility.drawRectNotWH(posX - 1.0D, posY - 0.5D, endPosX + 0.5D, posY + 0.5D + 0.5D, HudModule.getColor(130).getRGB());
//                        RenderUtility.drawRectNotWH(endPosX - 0.5D - 0.5D, posY, endPosX + 0.5D, endPosY + 0.5D, HudModule.getColor(50).getRGB());
//                        RenderUtility.drawRectNotWH(posX - 1.0D, endPosY - 0.5D - 0.5D, endPosX + 0.5D, endPosY + 0.5D, HudModule.getColor(190).getRGB());
//                        RenderUtility.drawRectNotWH(posX - 0.5D, posY, posX + 0.5D - 0.5D, endPosY, -1);
//                        RenderUtility.drawRectNotWH(posX, endPosY - 0.5D, endPosX, endPosY, -1);
//                        RenderUtility.drawRectNotWH(posX - 0.5D, posY, endPosX, posY + 0.5D, -1);
//                        RenderUtility.drawRectNotWH(endPosX - 0.5D, posY, endPosX, endPosY, -1);
                    }*/


                    {


                        float size = 100;

//                        double angle = (float) MathUtility.clamp(0, 30, ((Math.sin(System.currentTimeMillis() / 150D) + 1F) / 2F) * 30);
//                        double scale = (float) MathUtility.clamp(0.8, 1, ((Math.sin(System.currentTimeMillis() / 500D) + 1F) / 2F) * 1);
//                        double rotate = (float) MathUtility.clamp(0, 360, ((Math.sin(System.currentTimeMillis() / 1000D) + 1F) / 2F) * 360);

                        GlStateManager.pushMatrix();
                        GL11.glTranslatef((float) posX, (float) posY + size, 0.0F);
//                        GL11.glScaled(scale, scale, 1F);

                        double sc = MathUtility.clamp(0.75F, 1F, (1F - distanceToTarget() / AuraModule.INSTANCE.range.getDoubleValue()));
                        sc = MathUtility.lerp(scale, sc, 0.5F);
                        GL11.glScaled(sc, sc, sc);

                        GL11.glTranslatef((float) (-posX) - (size / 2F), (float) (-posY + size), 0.0F);

                        int color = ColorUtility.interpolate(HudModule.getColor(5).getRGB(), new Color(255, 0, 0).getRGB(),
                                (float) Math.sin(((EntityPlayer) entity).hurtTime * (18F * Math.PI / 180F))).intValue();
                        GLUtils.startRotate((float) posX + (size / 2), (float) posY, (float) (45F - (angle - 15F) + rotate));

                        GlStateManager.enableBlend();
                        GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE);
                        RenderUtility.drawImage(new ResourceLocation("client/images/triugolnik2.png"), (float) posX, (float) (posY) - (size / 2), size, size, color, 1);


//                        GLUtil.rotate((float) (posX + 25 + 50),
//                                (float) posY + 25 + 100, (float)
//                                        (Math.cos
//                                                ((System.currentTimeMillis() - Celiaset.deltaTime()) / 200F) * 5), () -> {
//                                    rotateComponent.run();
//                                    rotateComponent2.run();
//                                    rotateComponent3.run();
//                                    rotateComponent4.run();
//                                    RenderUtility.drawImage(new ResourceLocation("client/images/triugolnik2.png"), posX + 25, posY + 75, 50, 50, ((EntityPlayer) entity).hurtTime == 9 ? new Color(255, 0, 0) : HudModule.getColor(5), 1);
//
//                                });


                        GlStateManager.disableBlend();

                        GLUtils.endRotate();
                        GlStateManager.popMatrix();



                    }



                    final EntityLivingBase entityLivingBase = (EntityLivingBase) entity;
                    final double hpPercentage = entityLivingBase.getHealth() / entityLivingBase.getMaxHealth();
                    final double hpHeight2 = (endPosY - posY) * hpPercentage;
                    final double hpHeight3 = (endPosY - posY);
                    double dif = (endPosX - posX) / 2.0D;
                    double textWidth = (Fonts.MCR8.getStringWidth(entityLivingBase.getName()));


                    Utility.mc.entityRenderer.setupOverlayRendering();

                }
            }
        }
        GL11.glPopMatrix();
Задай ректы игрока (вроде PlayerEntity.getX,getYи тд) и подкорректируй и все будет как нада
 
Сверху Снизу