Исходник TargetESP Призраки | Expensive 2.0

Начинающий
Статус
Оффлайн
Регистрация
5 Июн 2024
Сообщения
31
Реакции[?]
0
Поинты[?]
0
Сливаю вам TargetEsp с призраками АДЕКВАТНЫЙ под базу Expensive 2.0

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


P.S Инструкция:
1.Создаете класс TargetESP в разделе Render
2.Делаете CTRL C + CTRL V
3. Потом все PNG перекидываете в assets/expensive/images/

(если сказал что-то не так прошу не бить меня палками, я новичек)

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

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import java.awt.Color;
import net.minecraft.client.renderer.WorldVertexBufferUploader;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Vector3d;
import net.optifine.shaders.Shaders;
import org.joml.Vector2d;
import org.lwjgl.opengl.GL11;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.player.EventUpdate;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.ClientManager;
import wtf.expensive.modules.api.Module;
import wtf.expensive.modules.api.ModuleInterface;
import wtf.expensive.modules.api.Type;
import wtf.expensive.modules.impl.combat.AttackAura;
import wtf.expensive.modules.settings.Setting;
import wtf.expensive.modules.settings.imp.ModeSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.WorldRenderEvent;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.CompactAnimation;
import wtf.expensive.util.animations.impl.DecelerateAnimation;
import wtf.expensive.util.animations.impl.EaseInOutQuad;
import wtf.expensive.util.animations.impl.Easing;
import wtf.expensive.util.math.MathUtil;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.NColor;
import wtf.expensive.util.render.ProjectionUtils;
import wtf.expensive.util.render.RenderUtil.IntColor;
import wtf.expensive.util.render.RenderUtil.Render2D;

@ModuleInterface(
        name = "TargetESP",
        type = Type.Render
)
public class TargetESP extends Module {
    private final Animation alpha = new DecelerateAnimation(255, 255.0);
    public static final long detime = System.currentTimeMillis();
    private LivingEntity currentTarget;
    private long currentTime;
    private float animation = 0.0F;
    public float markerX = 0.0F;
    public float markerY = 0.0F;
    public float markerZ = 0.0F;
    private boolean markerReached = false;
    float size = 150.0F;
    boolean markerRQ;
    Animation markerAnimation = new EaseInOutQuad(200, 0.20000000298023224);
    private final ResourceLocation glowCircle;
    public ModeSetting mode = new ModeSetting("Мод таргет есп", "Квадрат", new String[]{"Квадрат", "Круг", "Призраки"});
    public SliderSetting scale = (new SliderSetting("Размер", 2.0F, 1.0F, 3.0F, 0.1F)).setVisible(() -> {
        return this.mode.is("Призраки");
    });
    public SliderSetting scaleCircle = (new SliderSetting("Размер", 2.0F, 1.0F, 10.0F, 0.1F)).setVisible(() -> {
        return this.mode.is("Круг");
    });
    public SliderSetting radiusCircle = (new SliderSetting("Радиус", 0.8F, 0.6F, 1.4F, 0.1F)).setVisible(() -> {
        return this.mode.is("Круг");
    });
    public CompactAnimation markerA;

    public TargetESP() {
        this.markerA = new CompactAnimation(Easing.EASE_OUT_CUBIC, 600L);
        this.glowCircle = new ResourceLocation("expensive/images/glow.png");
        this.addSettings(new Setting[]{this.mode, this.scale, this.scaleCircle, this.radiusCircle});
    }

    public boolean onEvent(Event event) {
        boolean bl = ClientManager.MODULE.get("Attack-Aura").isState();
        if (event instanceof EventUpdate) {
            if (AttackAura.target != null) {
                this.currentTarget = AttackAura.target;
            }

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

        if (event instanceof EventRender eventRender) {
            WorldRenderEvent worldRenderEvent = null;
            if (this.alpha.finished(Direction.BACKWARDS)) {
                return bl;
            }

            if (this.alpha.finished(Direction.BACKWARDS)) {
                return bl;
            }

            if (this.currentTarget != null && this.currentTarget != mc.player) {
                double sin = Math.sin((double)System.currentTimeMillis() / 1000.0);
                LivingEntity targetEntity = AttackAura.getTarget();
                if (targetEntity == null) {
                    return bl;
                }

                Vector3d interpolated = targetEntity.getPositon(eventRender.partialTicks);
                Vector2d vector2d = ProjectionUtils.project(interpolated.x, interpolated.y + (double)(AttackAura.getTarget().getHeight() / 2.0F), interpolated.z);
                int color = ColorUtil.setAlpha(ColorUtil.getColorStyle(0.0F), (int)this.alpha.getOutput());
                int color2 = ColorUtil.setAlpha(ColorUtil.getColorStyle(90.0F), (int)this.alpha.getOutput());
                if (vector2d != null) {
                    GL11.glPushMatrix();
                    GL11.glTranslatef((float)vector2d.x, (float)vector2d.y, 0.0F);
                    GL11.glRotatef((float)sin * 360.0F, 0.0F, 0.0F, 1.0F);
                    GL11.glTranslatef((float)(-vector2d.x), (float)(-vector2d.y), 0.0F);
                    if (this.mode.is("Квадрат")) {
                        Render2D.drawImage(new ResourceLocation("expensive/images/target-esp2.png"), (float)vector2d.x - this.size / 2.0F, (float)vector2d.y - this.size / 2.0F, this.size, this.size, color, color, color2, color2);
                    }

                    GL11.glPopMatrix();
                }
            }

            if (this.mode.is("Круг")) {
                LivingEntity targetEntity = AttackAura.getTarget();
                if (targetEntity == null) {
                    return bl;
                }

                EntityRendererManager rm = mc.getRenderManager();
                double x = this.currentTarget.lastTickPosX + (this.currentTarget.getPosX() - this.currentTarget.lastTickPosX) * (double)eventRender.partialTicks - rm.info.getProjectedView().getX();
                double y = this.currentTarget.lastTickPosY + (this.currentTarget.getPosY() - this.currentTarget.lastTickPosY) * (double)eventRender.partialTicks - rm.info.getProjectedView().getY();
                double z = this.currentTarget.lastTickPosZ + (this.currentTarget.getPosZ() - this.currentTarget.lastTickPosZ) * (double)eventRender.partialTicks - rm.info.getProjectedView().getZ();
                float height = this.currentTarget.getHeight();
                double duration = 2000.0;
                double elapsed = (double)System.currentTimeMillis() % duration;
                boolean side = elapsed > duration / 2.0;
                double progress = elapsed / (duration / 2.0);
                if (side) {
                    --progress;
                } else {
                    progress = 1.0 - progress;
                }

                progress = progress < 0.5 ? 2.0 * progress * progress : 1.0 - Math.pow(-2.0 * progress + 2.0, 2.0) / 2.0;
                double eased = (double)(height / 2.0F) * (progress > 0.5 ? 1.0 - progress : progress) * (double)(side ? -1 : 1);
                RenderSystem.pushMatrix();
                GL11.glDepthMask(false);
                GL11.glEnable(2848);
                GL11.glHint(3154, 4354);
                RenderSystem.disableTexture();
                RenderSystem.enableBlend();
                RenderSystem.disableAlphaTest();
                RenderSystem.shadeModel(7425);
                RenderSystem.disableCull();
                RenderSystem.lineWidth(this.scaleCircle.getValue().floatValue());
                RenderSystem.color4f(-1.0F, -1.0F, -1.0F, -1.0F);
                buffer.begin(8, DefaultVertexFormats.POSITION_COLOR);
                float[] colors = null;

                int i;
                for(i = 0; i <= 360; ++i) {
                    colors = IntColor.rgb(ClientManager.STYLE_MANAGER.getCurrentStyle().getColor(i));
                    buffer.pos(x + Math.cos(Math.toRadians((double)i)) * (double)this.currentTarget.getWidth() * (double)this.radiusCircle.getValue().floatValue(), y + (double)height * progress, z + Math.sin(Math.toRadians((double)i)) * (double)this.currentTarget.getWidth() * (double)this.radiusCircle.getValue().floatValue()).color(colors[0], colors[1], colors[2], 0.5F).endVertex();
                    buffer.pos(x + Math.cos(Math.toRadians((double)i)) * (double)this.currentTarget.getWidth() * (double)this.radiusCircle.getValue().floatValue(), y + (double)height * progress + eased, z + Math.sin(Math.toRadians((double)i)) * (double)this.currentTarget.getWidth() * (double)this.radiusCircle.getValue().floatValue()).color(colors[0], colors[1], colors[2], 0.0F).endVertex();
                }

                buffer.finishDrawing();
                WorldVertexBufferUploader.draw(buffer);
                RenderSystem.color4f(-1.0F, -1.0F, -1.0F, -1.0F);
                buffer.begin(2, DefaultVertexFormats.POSITION_COLOR);

                for(i = 0; i <= 360; ++i) {
                    buffer.pos(x + Math.cos(Math.toRadians((double)i)) * (double)this.currentTarget.getWidth() * (double)this.radiusCircle.getValue().floatValue(), y + (double)height * progress, z + Math.sin(Math.toRadians((double)i)) * (double)this.currentTarget.getWidth() * (double)this.radiusCircle.getValue().floatValue()).color(colors[0], colors[1], colors[2], 0.5F).endVertex();
                }

                buffer.finishDrawing();
                WorldVertexBufferUploader.draw(buffer);
                RenderSystem.enableCull();
                RenderSystem.disableBlend();
                RenderSystem.enableTexture();
                RenderSystem.enableAlphaTest();
                GL11.glDepthMask(true);
                GL11.glDisable(2848);
                GL11.glHint(3154, 4354);
                RenderSystem.shadeModel(7424);
                RenderSystem.popMatrix();
            }

            if (this.mode.is("Призраки")) {
                if (AttackAura.target == null) {
                    this.markerReached = false;
                    this.markerRQ = false;
                    this.markerAnimation = new EaseInOutQuad(200, 0.20000000298023224);
                    this.markerAnimation.reset();
                    this.markerA.run(0.0);
                } else {
                    this.markerA.run(1.0);
                }

                if (!this.markerReached) {
                    this.markerAnimation.setDirection(true);
                    if (this.markerAnimation.finished(Direction.FORWARDS)) {
                        this.markerReached = true;
                    }
                } else {
                    this.markerAnimation.setDirection(false);
                }

                MatrixStack ms = new MatrixStack();
                if (AttackAura.target != null) {
                    double xv = ColorUtil.interporate2((double)mc.getRenderPartialTicks(), AttackAura.target.lastTickPosX, AttackAura.target.getPosX());
                    double yv = ColorUtil.interporate2((double)mc.getRenderPartialTicks(), AttackAura.target.lastTickPosY, AttackAura.target.getPosY()) + (double)(AttackAura.target.getHeight() / 1.6F);
                    double zv = ColorUtil.interporate2((double)mc.getRenderPartialTicks(), AttackAura.target.lastTickPosZ, AttackAura.target.getPosZ());
                    this.markerX = (float)xv;
                    this.markerY = (float)yv;
                    this.markerZ = (float)zv;
                }

                this.renderAlternativeMarker(ms);
            }
        }

        return bl;
    }

    public void renderAlternativeMarker(MatrixStack stack) {
        float c = (float)((double)((float)(System.currentTimeMillis() - Initilization.startTime) / 1500.0F) + Math.sin((double)((float)(System.currentTimeMillis() - Initilization.startTime) / 1500.0F)) / 10.0);
        double ix = -mc.getRenderManager().info.getProjectedView().getX();
        double iy = -mc.getRenderManager().info.getProjectedView().getY();
        double iz = -mc.getRenderManager().info.getProjectedView().getZ();
        double x = (double)this.markerX;
        double y = (double)this.markerY;
        double z = (double)this.markerZ;
        float alpha = Shaders.shaderPackLoaded ? 1.0F : 0.5F;
        alpha *= this.markerA.getNumberValue().floatValue();
        boolean rb = false;
        rb = true;
        float pl = 0.0F;
        boolean fa = true;

        for(int b = 0; b < 3; ++b) {
            for(float i = c * 360.0F; i < c * 360.0F + 90.0F; i += 2.0F) {
                float max = c * 360.0F + 90.0F;
                float dc = MathUtil.normalize(i, c * 360.0F - 45.0F, max);
                Color color = ColorUtil.calculateColorA((int)i * 2 + b * 32);
                Color color2 = ColorUtil.calculateColorB((int)i * 2 + b * 32 + 4);
                float rf = 0.6F * this.markerA.getNumberValue().floatValue();
                double radians = Math.toRadians((double)i);
                double plY = (double)pl + Math.sin(radians * 1.2000000476837158) * 0.10000000149011612;
                stack.push();
                stack.translate(ix, iy, iz);
                stack.translate(x, y, z);
                stack.rotate(mc.getRenderManager().info.getRotation());
                RenderSystem.depthMask(false);
                float q = (!fa ? 0.25F : 0.15F) * (Math.max(fa ? 0.25F : 0.15F, fa ? dc : (1.0F - -(0.4F - dc)) / 2.0F) + 0.45F);
                float w = q * (this.scale.getValue().floatValue() + (0.5F - alpha) * 2.0F);
                Render2D.drawImage(stack, new ResourceLocation("ferum/images/glow.png"), Math.cos(radians) * (double)rf - (double)(w / 2.0F), plY - 0.7, Math.sin(radians) * (double)rf - (double)(w / 2.0F), (double)w, (double)w, NColor.fromColor(color).withCustomAlpha(alpha).hashCode(), NColor.fromColor(color2).withCustomAlpha(alpha).hashCode(), NColor.fromColor(color2).withCustomAlpha(alpha).hashCode(), NColor.fromColor(color).withCustomAlpha(alpha).hashCode());
                GL11.glEnable(2929);
                RenderSystem.depthMask(true);
                stack.pop();
            }

            c *= -1.25F;
            fa = !fa;
            pl += 0.45F;
        }

    }
}
И где утилки?
Просто оно реально не может найти утилки т.к их нет xdd
 
Сверху Снизу