Исходник TargetESP | Ромб + Призраки | Expensive 3.1

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

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

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

Спасибо!

Сливаю норм таргет есп на Expensive 3.1 - Ancient
Пожалуйста, авторизуйтесь для просмотра ссылки.

Java:
package im.expensive.modules.impl.render;

import static com.mojang.blaze3d.platform.GlStateManager.GL_QUADS;
import static com.mojang.blaze3d.systems.RenderSystem.depthMask;
import static net.minecraft.client.renderer.vertex.DefaultVertexFormats.POSITION_COLOR_TEX;


import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.events.EventUpdate;
import im.expensive.events.WorldEvent;
import im.expensive.modules.settings.impl.BooleanSetting;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.DecelerateAnimation;
import im.expensive.utils.math.MathUtil;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.WorldVertexBufferUploader;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Quaternion;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;

import im.expensive.Expensive;
import im.expensive.events.EventDisplay.Type;
import im.expensive.modules.api.Category;
import im.expensive.modules.api.Module;
import im.expensive.modules.api.ModuleRegister;
import im.expensive.modules.impl.combat.HitAura;
import im.expensive.modules.settings.impl.ModeSetting;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.projections.ProjectionUtil;
import im.expensive.utils.render.color.ColorUtils;
import im.expensive.utils.render.rect.DisplayUtils;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;


@ModuleRegister(name = "TargetESP", category = Category.Render)
public class TargetESP extends Module {
    public ModeSetting mode = new ModeSetting("Мод", "Ромб", "Ромб", "Призраки");
    public BooleanSetting animka = new BooleanSetting("Статичный", true);
    private final Animation alpha = new DecelerateAnimation(600, 255);
    private final HitAura hitAura;
    private LivingEntity currentTarget;
    private static long startTime = System.currentTimeMillis();
    private long lastTime = System.currentTimeMillis();

    public TargetESP(HitAura hitAura) {
        this.hitAura = hitAura;
        addSettings(mode, animka);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        boolean bl = (Expensive.getInstance().getModuleManager().getHitAura().isState() || Expensive.getInstance().getModuleManager().getTPInfluence().isState());
        if (hitAura.getTarget() != null) {
            currentTarget = hitAura.getTarget();
        }

        this.alpha.setDirection(bl && hitAura.getTarget() != null ? Direction.FORWARDS : Direction.BACKWARDS);
    }

    @Subscribe
    public void onRender(WorldEvent e) {
        if (this.alpha.finished(Direction.BACKWARDS)) {
            return;
        }
        if (mode.is("Призраки")) {
            if (this.currentTarget != null && this.currentTarget != mc.player) {
                MatrixStack ms = new MatrixStack();
                ms.push();
                RenderSystem.pushMatrix();
                RenderSystem.disableLighting();
                depthMask(false);
                RenderSystem.enableBlend();
                RenderSystem.shadeModel(7425);
                RenderSystem.disableCull();
                RenderSystem.disableAlphaTest();
                RenderSystem.blendFuncSeparate(770, 1, 0, 1);
                double x = currentTarget.getPosX();
                double y = currentTarget.getPosY() + currentTarget.getHeight() / 2f;
                double z = currentTarget.getPosZ();
                double radius = 0.67;
                float speed = 45;
                float size = 0.4f;
                double distance = 19;
                int lenght = 20;
                int maxAlpha = 255;
                int alphaFactor = 15;
                ActiveRenderInfo camera = mc.getRenderManager().info;
                ms.translate(-mc.getRenderManager().info.getProjectedView().getX(),
                        -mc.getRenderManager().info.getProjectedView().getY(),
                        -mc.getRenderManager().info.getProjectedView().getZ());

                Vector3d interpolated = MathUtil.interpolate(currentTarget.getPositionVec(), new Vector3d(currentTarget.lastTickPosX, currentTarget.lastTickPosY, currentTarget.lastTickPosZ), e.getPartialTicks());
                interpolated.y += 0.75f;
                ms.translate(interpolated.x + 0.2f, interpolated.y + 0.5f, interpolated.z);
                mc.getTextureManager().bindTexture(new ResourceLocation("eva/images/glow.png"));
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(s, (c), -c);
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate(-(s), -(c), (c));
                }
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(-s, s, -c);
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate((s), -(s), (c));
                }
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(-(s), -(s), (c));
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate((s), (s), -(c));
                }
                RenderSystem.defaultBlendFunc();
                RenderSystem.disableBlend();
                RenderSystem.enableCull();
                RenderSystem.enableAlphaTest();
                depthMask(true);
                RenderSystem.popMatrix();
                ms.pop();
            }
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (this.alpha.finished(Direction.BACKWARDS)) {
            return;

        }
        double sin;
        Vector3d interpolated;
        float size;
        Vector2f pos;
        int alpha;

        if (e.getType() != Type.PRE) {
            return;
        }
        if (mode.is("Ромб")) {
            if (this.currentTarget != null && this.currentTarget != mc.player) {
                sin = Math.sin((double) System.currentTimeMillis() / 1000.0);
                interpolated = this.currentTarget.getPositon(e.getPartialTicks());
                if (animka.get()) {
                    size = (float) this.getScale(interpolated, 16);
                } else {
                    size = 150;
                }

                pos = ProjectionUtil.project(interpolated.x, interpolated.y + (double) (this.currentTarget.getHeight() / 1.95F), interpolated.z);
                GlStateManager.pushMatrix();
                GlStateManager.translatef(pos.x, pos.y, 0.0F);
                GlStateManager.rotatef((float) sin * 360.0F, 0.0F, 0.0F, 1.0F);
                GlStateManager.translatef(-pos.x, -pos.y, 0.0F);
                GlStateManager.enableBlend();
                GlStateManager.blendFunc(770, 1);
                alpha = (int) this.alpha.getOutput();
                    DisplayUtils.drawImageAlpha(new ResourceLocation("eva/images/target.png"), pos.x - size / 2.0F, pos.y - size / 2.0F, size, size, new Vector4i(ColorUtils.setAlpha(Theme.getColor(0, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(90, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(180, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(270, 1.0F), alpha)));
               
                GlStateManager.disableBlend();
                GlStateManager.popMatrix();
            }
        }
    }

    public double getScale(Vector3d position, double size) {
        Vector3d cam = mc.getRenderManager().info.getProjectedView();
        double distance = cam.distanceTo(position);
        double fov = mc.gameRenderer.getFOVModifier(mc.getRenderManager().info, mc.getRenderPartialTicks(), true);
        return Math.max(10.0, 1000.0 / distance) * (size / 30.0) / (fov == 70.0 ? 1.0 : fov / 70.0);
    }
}
ище вот DrawIgameAlpha
Java:
  public static void drawImageAlpha(ResourceLocation resourceLocation, float x, float y, float width, float height,
                                      int color) {
        RenderSystem.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.defaultBlendFunc();
        RenderSystem.shadeModel(7425);
        mc.getTextureManager().bindTexture(resourceLocation);
        quads(x, y, width, height, 7, color);
        RenderSystem.shadeModel(7424);
        RenderSystem.color4f(1, 1, 1, 1);
        RenderSystem.popMatrix();
    }


    public static void drawImageAlpha(ResourceLocation resourceLocation, float x, float y, float width, float height, Vector4i color) {
        RenderSystem.pushMatrix();
        RenderSystem.disableLighting();
        RenderSystem.depthMask(false);
        RenderSystem.enableBlend();
        RenderSystem.shadeModel(7425);
        RenderSystem.disableCull();
        RenderSystem.disableAlphaTest();
        RenderSystem.blendFuncSeparate(770, 1, 0, 1);
        mc.getTextureManager().bindTexture(resourceLocation);
        buffer.begin(7, POSITION_TEX_COLOR);
        {
            buffer.pos(x, y, 0).tex(0, 1 - 0.01f).lightmap(0, 240).color(color.x).endVertex();
            buffer.pos(x, y + height, 0).tex(1, 1 - 0.01f).lightmap(0, 240).color(color.y).endVertex();
            buffer.pos(x + width, y + height, 0).tex(1, 0).lightmap(0, 240).color(color.z).endVertex();
            buffer.pos(x + width, y, 0).tex(0, 0).lightmap(0, 240).color(color.w).endVertex();

        }
        tessellator.draw();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableBlend();
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.depthMask(true);
        RenderSystem.popMatrix();
    }
ище и reAlphaInt
Java:
   public static int reAlphaInt(final int color,
                                 final int alpha) {
        return (MathHelper.clamp(alpha, 0, 255) << 24) | (color & 16777215);
    }
думаю заренеймить сможете
ище забыл пнг сори вот они - 1733923179838.png1733923198440.png
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
8 Авг 2024
Сообщения
92
Реакции[?]
0
Поинты[?]
0
Сливаю норм таргет есп на Expensive 3.1 - Ancient
Пожалуйста, авторизуйтесь для просмотра ссылки.

Java:
package im.expensive.modules.impl.render;

import static com.mojang.blaze3d.platform.GlStateManager.GL_QUADS;
import static com.mojang.blaze3d.systems.RenderSystem.depthMask;
import static net.minecraft.client.renderer.vertex.DefaultVertexFormats.POSITION_COLOR_TEX;


import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.events.EventUpdate;
import im.expensive.events.WorldEvent;
import im.expensive.modules.settings.impl.BooleanSetting;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.DecelerateAnimation;
import im.expensive.utils.math.MathUtil;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.WorldVertexBufferUploader;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Quaternion;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;

import im.expensive.Expensive;
import im.expensive.events.EventDisplay.Type;
import im.expensive.modules.api.Category;
import im.expensive.modules.api.Module;
import im.expensive.modules.api.ModuleRegister;
import im.expensive.modules.impl.combat.HitAura;
import im.expensive.modules.settings.impl.ModeSetting;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.projections.ProjectionUtil;
import im.expensive.utils.render.color.ColorUtils;
import im.expensive.utils.render.rect.DisplayUtils;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;


@ModuleRegister(name = "TargetESP", category = Category.Render)
public class TargetESP extends Module {
    public ModeSetting mode = new ModeSetting("Мод", "Ромб", "Ромб", "Призраки");
    public BooleanSetting animka = new BooleanSetting("Статичный", true);
    private final Animation alpha = new DecelerateAnimation(600, 255);
    private final HitAura hitAura;
    private LivingEntity currentTarget;
    private static long startTime = System.currentTimeMillis();
    private long lastTime = System.currentTimeMillis();

    public TargetESP(HitAura hitAura) {
        this.hitAura = hitAura;
        addSettings(mode, animka);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        boolean bl = (Expensive.getInstance().getModuleManager().getHitAura().isState() || Expensive.getInstance().getModuleManager().getTPInfluence().isState());
        if (hitAura.getTarget() != null) {
            currentTarget = hitAura.getTarget();
        }

        this.alpha.setDirection(bl && hitAura.getTarget() != null ? Direction.FORWARDS : Direction.BACKWARDS);
    }

    @Subscribe
    public void onRender(WorldEvent e) {
        if (this.alpha.finished(Direction.BACKWARDS)) {
            return;
        }
        if (mode.is("Призраки")) {
            if (this.currentTarget != null && this.currentTarget != mc.player) {
                MatrixStack ms = new MatrixStack();
                ms.push();
                RenderSystem.pushMatrix();
                RenderSystem.disableLighting();
                depthMask(false);
                RenderSystem.enableBlend();
                RenderSystem.shadeModel(7425);
                RenderSystem.disableCull();
                RenderSystem.disableAlphaTest();
                RenderSystem.blendFuncSeparate(770, 1, 0, 1);
                double x = currentTarget.getPosX();
                double y = currentTarget.getPosY() + currentTarget.getHeight() / 2f;
                double z = currentTarget.getPosZ();
                double radius = 0.67;
                float speed = 45;
                float size = 0.4f;
                double distance = 19;
                int lenght = 20;
                int maxAlpha = 255;
                int alphaFactor = 15;
                ActiveRenderInfo camera = mc.getRenderManager().info;
                ms.translate(-mc.getRenderManager().info.getProjectedView().getX(),
                        -mc.getRenderManager().info.getProjectedView().getY(),
                        -mc.getRenderManager().info.getProjectedView().getZ());

                Vector3d interpolated = MathUtil.interpolate(currentTarget.getPositionVec(), new Vector3d(currentTarget.lastTickPosX, currentTarget.lastTickPosY, currentTarget.lastTickPosZ), e.getPartialTicks());
                interpolated.y += 0.75f;
                ms.translate(interpolated.x + 0.2f, interpolated.y + 0.5f, interpolated.z);
                mc.getTextureManager().bindTexture(new ResourceLocation("eva/images/glow.png"));
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(s, (c), -c);
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate(-(s), -(c), (c));
                }
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(-s, s, -c);
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate((s), -(s), (c));
                }
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(-(s), -(s), (c));
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate((s), (s), -(c));
                }
                RenderSystem.defaultBlendFunc();
                RenderSystem.disableBlend();
                RenderSystem.enableCull();
                RenderSystem.enableAlphaTest();
                depthMask(true);
                RenderSystem.popMatrix();
                ms.pop();
            }
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (this.alpha.finished(Direction.BACKWARDS)) {
            return;

        }
        double sin;
        Vector3d interpolated;
        float size;
        Vector2f pos;
        int alpha;

        if (e.getType() != Type.PRE) {
            return;
        }
        if (mode.is("Ромб")) {
            if (this.currentTarget != null && this.currentTarget != mc.player) {
                sin = Math.sin((double) System.currentTimeMillis() / 1000.0);
                interpolated = this.currentTarget.getPositon(e.getPartialTicks());
                if (animka.get()) {
                    size = (float) this.getScale(interpolated, 16);
                } else {
                    size = 150;
                }

                pos = ProjectionUtil.project(interpolated.x, interpolated.y + (double) (this.currentTarget.getHeight() / 1.95F), interpolated.z);
                GlStateManager.pushMatrix();
                GlStateManager.translatef(pos.x, pos.y, 0.0F);
                GlStateManager.rotatef((float) sin * 360.0F, 0.0F, 0.0F, 1.0F);
                GlStateManager.translatef(-pos.x, -pos.y, 0.0F);
                GlStateManager.enableBlend();
                GlStateManager.blendFunc(770, 1);
                alpha = (int) this.alpha.getOutput();
                    DisplayUtils.drawImageAlpha(new ResourceLocation("eva/images/target.png"), pos.x - size / 2.0F, pos.y - size / 2.0F, size, size, new Vector4i(ColorUtils.setAlpha(Theme.getColor(0, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(90, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(180, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(270, 1.0F), alpha)));
               
                GlStateManager.disableBlend();
                GlStateManager.popMatrix();
            }
        }
    }

    public double getScale(Vector3d position, double size) {
        Vector3d cam = mc.getRenderManager().info.getProjectedView();
        double distance = cam.distanceTo(position);
        double fov = mc.gameRenderer.getFOVModifier(mc.getRenderManager().info, mc.getRenderPartialTicks(), true);
        return Math.max(10.0, 1000.0 / distance) * (size / 30.0) / (fov == 70.0 ? 1.0 : fov / 70.0);
    }
}
ище вот DrawIgameAlpha
Java:
  public static void drawImageAlpha(ResourceLocation resourceLocation, float x, float y, float width, float height,
                                      int color) {
        RenderSystem.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.defaultBlendFunc();
        RenderSystem.shadeModel(7425);
        mc.getTextureManager().bindTexture(resourceLocation);
        quads(x, y, width, height, 7, color);
        RenderSystem.shadeModel(7424);
        RenderSystem.color4f(1, 1, 1, 1);
        RenderSystem.popMatrix();
    }


    public static void drawImageAlpha(ResourceLocation resourceLocation, float x, float y, float width, float height, Vector4i color) {
        RenderSystem.pushMatrix();
        RenderSystem.disableLighting();
        RenderSystem.depthMask(false);
        RenderSystem.enableBlend();
        RenderSystem.shadeModel(7425);
        RenderSystem.disableCull();
        RenderSystem.disableAlphaTest();
        RenderSystem.blendFuncSeparate(770, 1, 0, 1);
        mc.getTextureManager().bindTexture(resourceLocation);
        buffer.begin(7, POSITION_TEX_COLOR);
        {
            buffer.pos(x, y, 0).tex(0, 1 - 0.01f).lightmap(0, 240).color(color.x).endVertex();
            buffer.pos(x, y + height, 0).tex(1, 1 - 0.01f).lightmap(0, 240).color(color.y).endVertex();
            buffer.pos(x + width, y + height, 0).tex(1, 0).lightmap(0, 240).color(color.z).endVertex();
            buffer.pos(x + width, y, 0).tex(0, 0).lightmap(0, 240).color(color.w).endVertex();

        }
        tessellator.draw();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableBlend();
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.depthMask(true);
        RenderSystem.popMatrix();
    }
ище и reAlphaInt
Java:
   public static int reAlphaInt(final int color,
                                 final int alpha) {
        return (MathHelper.clamp(alpha, 0, 255) << 24) | (color & 16777215);
    }
думаю заренеймить сможете
красива :seemsgood:
 
Начинающий
Статус
Оффлайн
Регистрация
21 Сен 2024
Сообщения
135
Реакции[?]
0
Поинты[?]
0
Сливаю норм таргет есп на Expensive 3.1 - Ancient
Пожалуйста, авторизуйтесь для просмотра ссылки.

Java:
package im.expensive.modules.impl.render;

import static com.mojang.blaze3d.platform.GlStateManager.GL_QUADS;
import static com.mojang.blaze3d.systems.RenderSystem.depthMask;
import static net.minecraft.client.renderer.vertex.DefaultVertexFormats.POSITION_COLOR_TEX;


import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.events.EventDisplay;
import im.expensive.events.EventUpdate;
import im.expensive.events.WorldEvent;
import im.expensive.modules.settings.impl.BooleanSetting;
import im.expensive.utils.animations.Animation;
import im.expensive.utils.animations.Direction;
import im.expensive.utils.animations.impl.DecelerateAnimation;
import im.expensive.utils.math.MathUtil;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.WorldVertexBufferUploader;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Quaternion;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;

import im.expensive.Expensive;
import im.expensive.events.EventDisplay.Type;
import im.expensive.modules.api.Category;
import im.expensive.modules.api.Module;
import im.expensive.modules.api.ModuleRegister;
import im.expensive.modules.impl.combat.HitAura;
import im.expensive.modules.settings.impl.ModeSetting;
import im.expensive.utils.math.Vector4i;
import im.expensive.utils.projections.ProjectionUtil;
import im.expensive.utils.render.color.ColorUtils;
import im.expensive.utils.render.rect.DisplayUtils;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;


@ModuleRegister(name = "TargetESP", category = Category.Render)
public class TargetESP extends Module {
    public ModeSetting mode = new ModeSetting("Мод", "Ромб", "Ромб", "Призраки");
    public BooleanSetting animka = new BooleanSetting("Статичный", true);
    private final Animation alpha = new DecelerateAnimation(600, 255);
    private final HitAura hitAura;
    private LivingEntity currentTarget;
    private static long startTime = System.currentTimeMillis();
    private long lastTime = System.currentTimeMillis();

    public TargetESP(HitAura hitAura) {
        this.hitAura = hitAura;
        addSettings(mode, animka);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        boolean bl = (Expensive.getInstance().getModuleManager().getHitAura().isState() || Expensive.getInstance().getModuleManager().getTPInfluence().isState());
        if (hitAura.getTarget() != null) {
            currentTarget = hitAura.getTarget();
        }

        this.alpha.setDirection(bl && hitAura.getTarget() != null ? Direction.FORWARDS : Direction.BACKWARDS);
    }

    @Subscribe
    public void onRender(WorldEvent e) {
        if (this.alpha.finished(Direction.BACKWARDS)) {
            return;
        }
        if (mode.is("Призраки")) {
            if (this.currentTarget != null && this.currentTarget != mc.player) {
                MatrixStack ms = new MatrixStack();
                ms.push();
                RenderSystem.pushMatrix();
                RenderSystem.disableLighting();
                depthMask(false);
                RenderSystem.enableBlend();
                RenderSystem.shadeModel(7425);
                RenderSystem.disableCull();
                RenderSystem.disableAlphaTest();
                RenderSystem.blendFuncSeparate(770, 1, 0, 1);
                double x = currentTarget.getPosX();
                double y = currentTarget.getPosY() + currentTarget.getHeight() / 2f;
                double z = currentTarget.getPosZ();
                double radius = 0.67;
                float speed = 45;
                float size = 0.4f;
                double distance = 19;
                int lenght = 20;
                int maxAlpha = 255;
                int alphaFactor = 15;
                ActiveRenderInfo camera = mc.getRenderManager().info;
                ms.translate(-mc.getRenderManager().info.getProjectedView().getX(),
                        -mc.getRenderManager().info.getProjectedView().getY(),
                        -mc.getRenderManager().info.getProjectedView().getZ());

                Vector3d interpolated = MathUtil.interpolate(currentTarget.getPositionVec(), new Vector3d(currentTarget.lastTickPosX, currentTarget.lastTickPosY, currentTarget.lastTickPosZ), e.getPartialTicks());
                interpolated.y += 0.75f;
                ms.translate(interpolated.x + 0.2f, interpolated.y + 0.5f, interpolated.z);
                mc.getTextureManager().bindTexture(new ResourceLocation("eva/images/glow.png"));
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(s, (c), -c);
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate(-(s), -(c), (c));
                }
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(-s, s, -c);
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate((s), -(s), (c));
                }
                for (int i = 0; i < lenght; i++) {
                    Quaternion r = camera.getRotation().copy();
                    buffer.begin(GL_QUADS, POSITION_COLOR_TEX);
                    double angle = 0.15f * (System.currentTimeMillis() - lastTime - (i * distance)) / (speed);
                    double s = Math.sin(angle) * radius;
                    double c = Math.cos(angle) * radius;
                    ms.translate(-(s), -(s), (c));
                    ms.translate(-size / 2f, -size / 2f, 0);
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    int color = Theme.getColor(0);
                    int alpha = MathHelper.clamp(maxAlpha - (i * alphaFactor), 0, maxAlpha);
                    buffer.pos(ms.getLast().getMatrix(), 0, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 0).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, -size, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(0, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), -size, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 1).endVertex();
                    buffer.pos(ms.getLast().getMatrix(), 0, 0, 0).color(DisplayUtils.reAlphaInt(color, alpha)).tex(1, 0).endVertex();
                    tessellator.draw();
                    ms.translate(-size / 2f, -size / 2f, 0);
                    r.conjugate();
                    ms.rotate(r);
                    ms.translate(size / 2f, size / 2f, 0);
                    ms.translate((s), (s), -(c));
                }
                RenderSystem.defaultBlendFunc();
                RenderSystem.disableBlend();
                RenderSystem.enableCull();
                RenderSystem.enableAlphaTest();
                depthMask(true);
                RenderSystem.popMatrix();
                ms.pop();
            }
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (this.alpha.finished(Direction.BACKWARDS)) {
            return;

        }
        double sin;
        Vector3d interpolated;
        float size;
        Vector2f pos;
        int alpha;

        if (e.getType() != Type.PRE) {
            return;
        }
        if (mode.is("Ромб")) {
            if (this.currentTarget != null && this.currentTarget != mc.player) {
                sin = Math.sin((double) System.currentTimeMillis() / 1000.0);
                interpolated = this.currentTarget.getPositon(e.getPartialTicks());
                if (animka.get()) {
                    size = (float) this.getScale(interpolated, 16);
                } else {
                    size = 150;
                }

                pos = ProjectionUtil.project(interpolated.x, interpolated.y + (double) (this.currentTarget.getHeight() / 1.95F), interpolated.z);
                GlStateManager.pushMatrix();
                GlStateManager.translatef(pos.x, pos.y, 0.0F);
                GlStateManager.rotatef((float) sin * 360.0F, 0.0F, 0.0F, 1.0F);
                GlStateManager.translatef(-pos.x, -pos.y, 0.0F);
                GlStateManager.enableBlend();
                GlStateManager.blendFunc(770, 1);
                alpha = (int) this.alpha.getOutput();
                    DisplayUtils.drawImageAlpha(new ResourceLocation("eva/images/target.png"), pos.x - size / 2.0F, pos.y - size / 2.0F, size, size, new Vector4i(ColorUtils.setAlpha(Theme.getColor(0, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(90, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(180, 1.0F), alpha), ColorUtils.setAlpha(Theme.getColor(270, 1.0F), alpha)));
               
                GlStateManager.disableBlend();
                GlStateManager.popMatrix();
            }
        }
    }

    public double getScale(Vector3d position, double size) {
        Vector3d cam = mc.getRenderManager().info.getProjectedView();
        double distance = cam.distanceTo(position);
        double fov = mc.gameRenderer.getFOVModifier(mc.getRenderManager().info, mc.getRenderPartialTicks(), true);
        return Math.max(10.0, 1000.0 / distance) * (size / 30.0) / (fov == 70.0 ? 1.0 : fov / 70.0);
    }
}
ище вот DrawIgameAlpha
Java:
  public static void drawImageAlpha(ResourceLocation resourceLocation, float x, float y, float width, float height,
                                      int color) {
        RenderSystem.pushMatrix();
        RenderSystem.enableBlend();
        RenderSystem.defaultBlendFunc();
        RenderSystem.shadeModel(7425);
        mc.getTextureManager().bindTexture(resourceLocation);
        quads(x, y, width, height, 7, color);
        RenderSystem.shadeModel(7424);
        RenderSystem.color4f(1, 1, 1, 1);
        RenderSystem.popMatrix();
    }


    public static void drawImageAlpha(ResourceLocation resourceLocation, float x, float y, float width, float height, Vector4i color) {
        RenderSystem.pushMatrix();
        RenderSystem.disableLighting();
        RenderSystem.depthMask(false);
        RenderSystem.enableBlend();
        RenderSystem.shadeModel(7425);
        RenderSystem.disableCull();
        RenderSystem.disableAlphaTest();
        RenderSystem.blendFuncSeparate(770, 1, 0, 1);
        mc.getTextureManager().bindTexture(resourceLocation);
        buffer.begin(7, POSITION_TEX_COLOR);
        {
            buffer.pos(x, y, 0).tex(0, 1 - 0.01f).lightmap(0, 240).color(color.x).endVertex();
            buffer.pos(x, y + height, 0).tex(1, 1 - 0.01f).lightmap(0, 240).color(color.y).endVertex();
            buffer.pos(x + width, y + height, 0).tex(1, 0).lightmap(0, 240).color(color.z).endVertex();
            buffer.pos(x + width, y, 0).tex(0, 0).lightmap(0, 240).color(color.w).endVertex();

        }
        tessellator.draw();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableBlend();
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.depthMask(true);
        RenderSystem.popMatrix();
    }
ище и reAlphaInt
Java:
   public static int reAlphaInt(final int color,
                                 final int alpha) {
        return (MathHelper.clamp(alpha, 0, 255) << 24) | (color & 16777215);
    }
думаю заренеймить сможете
1733918445844.png/del
 
Начинающий
Статус
Оффлайн
Регистрация
11 Апр 2024
Сообщения
53
Реакции[?]
0
Поинты[?]
0
Да не ничего, а так норм есп
понял мне лень было просто переписавать експу взял еву там почти все есть что мне надо
научись ренеймить бро -_-
:frog-wow:
 
Сверху Снизу