Вопрос Target Esp Expensive 3.1 Призраки,не отображаются ,Помогите

Начинающий
Статус
Онлайн
Регистрация
8 Мар 2024
Сообщения
562
Реакции[?]
2
Поинты[?]
2K
Target Esp Expensive 3.1 Призраки,не отображаются
TargerEsp.java:
package im.shadow.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import im.shadow.utils.math.NMathUtil;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import im.shadow.events.EventDisplay;
import im.shadow.events.EventDisplay.Type;
import im.shadow.functions.api.Category;
import im.shadow.functions.api.Function;
import im.shadow.functions.api.FunctionRegister;
import im.shadow.functions.impl.combat.KillAura;
import im.shadow.functions.settings.Setting;
import im.shadow.functions.settings.impl.ModeSetting;
import im.shadow.functions.settings.impl.SliderSetting;
import im.shadow.utils.math.Vector4i;
import im.shadow.utils.projections.ProjectionUtil;
import im.shadow.utils.render.ColorUtils;
import im.shadow.utils.render.DisplayUtils;
import org.lwjgl.opengl.GL11;

@FunctionRegister(
name = "TargetESPNew",
type = Category.Render
)
public class TargetESPNew extends Function {
private final KillAura killAura;
public ModeSetting mod = new ModeSetting("Мод", "Nurik", "Nurik", "Призраки");

public TargetESPNew(KillAura killAura) {
this.killAura = killAura;
this.addSettings(new Setting[]{this.mod});
}

@Subscribe
private void onDisplay(EventDisplay e) {
if (this.mod.is("Nurik")) {
if (e.getType() != Type.PRE) {
return;
}

if (this.killAura.isState() && this.killAura.getTarget() != null) {
double sin = Math.sin((double) System.currentTimeMillis() / 1000.0);
float size = 70.0F;
Vector3d interpolated = this.killAura.getTarget().getPositon(e.getPartialTicks());
Vector2f pos = ProjectionUtil.project(interpolated.x, interpolated.y + (double) (this.killAura.getTarget().getHeight() / 2.0F), 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);
DisplayUtils.drawImage(new ResourceLocation("expensive/images/target.png"), pos.x - size / 2.0F, pos.y - size / 2.0F, size, size, new Vector4i(ColorUtils.rgb(255, 255, 255), ColorUtils.setAlpha(HUD.getColor(90, 1.0F), 220), ColorUtils.setAlpha(HUD.getColor(180, 1.0F), 220), ColorUtils.setAlpha(HUD.getColor(270, 1.0F), 220)));
GlStateManager.popMatrix();
}
}
}

public void onDisplay(MatrixStack stack, EventDisplay e) {
if (this.mod.is("Призраки")) {
if (e.getType() != EventDisplay.Type.PRE) {
return;
}
long startTime = System.currentTimeMillis();
float c = (float) ((((System.currentTimeMillis() - startTime) / 1500F)) + (Math.sin((((System.currentTimeMillis() - startTime) / 1500F))) / 10f));

MatrixStack ms = stack;

double ix = -((mc.getRenderManager().info.getProjectedView().getX()));
double iy = -((mc.getRenderManager().info.getProjectedView().getY()));
double iz = -((mc.getRenderManager().info.getProjectedView().getZ()));

double markerX = 0;
double markerY = 0;
double markerZ = 0;
double x = markerX;
double y = markerY;
double z = markerZ;


float f2 = 0.5f;
float f3 = 0.0f;
boolean bl = true;
for (int i = 0; i < 3; ++i) {
for (float f4 = c * 360.0f; f4 < c * 360.0f + 90.0f; f4 += 2.0f) {
double d7 = Math.toRadians(f4);
double d8 = (double) f3 + Math.sin(d7 * (double) 1.2f) * (double) 0.1f;
float f5 = c * 360.0f + 90.0f;
float f6 = NMathUtil.normalize(f4, c * 360.0f - 45.0f, f5);
float f7 = 0.6f;
int n = 0;
ms.push();
ms.translate(ix, iy, iz);
ms.translate(x, y, z);
ms.rotate(mc.getRenderManager().info.getRotation());
RenderSystem.depthMask(false);
f6 = (!bl ? 0.25f : 0.15f) * (Math.max(bl ? 0.25f : 0.15f, bl ? f6 : (1.0f - -(0.4f - f6)) / 2.0f) + 0.45f) * (1.5f + (0.5f - f2) * 2.0f);
DisplayUtils.drawImage2(ms, new ResourceLocation("expensive/images/circleglow2.png"), Math.cos(d7) * (double) f7 - (double) (f6 / 2.0f), d8 - (double) 0.7f, Math.sin(d7) * (double) f7 - (double) (f6 / 2.0f), f6, f6, n, n, n, n);
GL11.glEnable(GL11.GL_DEPTH_TEST);
RenderSystem.depthMask(true);
ms.pop();
}
c *= -1.25f;
bl = !bl;
f3 += 0.45f;
}

}
}
}
DisplayUtils.java:
public static void drawImage2(MatrixStack ms, ResourceLocation resourceLocation, double x, double y,double z ,double height, float width, int color1, int color2, int color3, int color4) {
Minecraft minecraft = Minecraft.getInstance();
RenderSystem.enableBlend();
RenderSystem.blendFunc(770, 1);
GL11.glShadeModel((int)7425);
GL11.glAlphaFunc((int)516, (float)0.0f);
mc.getTextureManager().bindTexture(resourceLocation);
RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferBuilder = tessellator.getBuffer();
bufferBuilder.begin(7, POSITION_TEX_COLOR);
bufferBuilder.pos(ms.getLast().getMatrix(), (float) x, (float) (y + height), (float) (z)).color((color1 >> 16) & 0xFF, (color1 >> 8) & 0xFF, color1 & 0xFF, color1 >>> 24).tex(0, 1 - 0.01f).lightmap(0, 240).endVertex();
bufferBuilder.pos(ms.getLast().getMatrix(), (float) (x + width), (float) (y + height), (float) (z + width)).color((color2 >> 16) & 0xFF, (color2 >> 8) & 0xFF, color2 & 0xFF, color2 >>> 24).tex(1, 1 - 0.01f).lightmap(0, 240).endVertex();
bufferBuilder.pos(ms.getLast().getMatrix(), (float) (x + width), (float) y, (float) ((float) z + width)).color((color3 >> 16) & 0xFF, (color3 >> 8) & 0xFF, color3 & 0xFF, color3 >>> 24).tex(1, 0).lightmap(0, 240).endVertex();
bufferBuilder.pos(ms.getLast().getMatrix(), (float) x, (float) y, (float) z).color((color4 >> 16) & 0xFF, (color4 >> 8) & 0xFF, color4 & 0xFF, color4 >>> 24).tex(0, 0).lightmap(0, 240).endVertex();
tessellator.draw();
RenderSystem.disableBlend();
}
NMathUtil.java:
package im.shadow.utils.math;

import lombok.experimental.UtilityClass;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;

import java.awt.*;
import java.math.BigDecimal;
import java.math.RoundingMode;

@UtilityClass
public class NMathUtil {
public float EPSILON2 = 1E-2F;

public float EPSILON6 = 1E-6F;

public float calculateGaussianValue(float x, float sigma) {
double output = 1.0 / Math.sqrt(2.0 * Math.PI * (sigma * sigma));
return (float) (output * Math.exp(-(x * x) / (2.0 * (sigma * sigma))));
}

public float calculateDelta(float a, float b) {
return a - b;
}

public static Color mix(Color color1, Color color2, float factor) {
float r = color1.getRed() * (1 - factor) + color2.getRed() * factor;
float g = color1.getGreen() * (1 - factor) + color2.getGreen() * factor;
float b = color1.getBlue() * (1 - factor) + color2.getBlue() * factor;
float a = color1.getAlpha() * (1 - factor) + color2.getAlpha() * factor;

return new Color(Math.round(r), Math.round(g), Math.round(b), Math.round(a));
}

public static float smoothstep(float edge0, float edge1, float x) {
float t = Math.max(0, Math.min(1, (x - edge0) / (edge1 - edge0)));
return t * t * (3 - 2 * t);
}

public static double interporate(double p_219803_0_, double p_219803_2_, double p_219803_4_) {
return p_219803_2_ + p_219803_0_ * (p_219803_4_ - p_219803_2_);
}

public static float interporate(float p_219803_0_, float p_219803_2_, float p_219803_4_) {
return p_219803_2_ + p_219803_0_ * (p_219803_4_ - p_219803_2_);
}

public static double easeInOutQuad(double x, int step) {
return x < 0.5 ? 2.0 * x * x : 1.0 - Math.pow(-2.0 * x + 2.0, step) / 2.0;
}

public static BigDecimal roundf(float f, int times) {
BigDecimal bd = new BigDecimal(Float.toString(f));
bd = bd.setScale(times, RoundingMode.HALF_UP);
return bd;
}

public double round(double target, int decimal) {
double p = Math.pow(10, decimal);
return Math.round(target * p) / p;
}

public float randomizeFloat(float min, float max) {
return (float) (min + Math.random() * (max - min));
}

public float lerp(float min, float max, float delta) {
return min + (max - min) * delta;
}

public int lerp(int min, float max, float delta) {
return (int) (min + (max - min) * delta);
}


public float normalize(float value, float min, float max) {
return (value - min) / (max - min);
}

public float denormalize(float value, float min, float max) {
return min + (max - min) * value;
}

public float animation(float animation, float target, float speed) {
float dif = (target - animation) / Math.max((float) Minecraft.getInstance().getFrameTimer().getFrames().length, 5.0f) * 15.0f;
if (dif > 0.0f) {
dif = Math.max(speed, dif);
dif = Math.min(target - animation, dif);
} else if (dif < 0.0f) {
dif = Math.min(-speed, dif);
dif = Math.max(target - animation, dif);
}
return animation + dif;
}

public int animation(int animation, float target, float speed) {
float dif = (target - animation) / Math.max((float) Minecraft.getInstance().getFrameTimer().getFrames().length, 5.0f) * 15.0f;
if (dif > 0.0f) {
dif = Math.max(speed, dif);
dif = Math.min(target - animation, dif);
} else if (dif < 0.0f) {
dif = Math.min(-speed, dif);
dif = Math.max(target - animation, dif);
}
return (int) (animation + dif);
}

public static float clamp(float num, float min, float max) {
return Math.min(Math.max(num, min), max);
}

public static int clamp(int num, int min, int max) {
return Math.min(Math.max(num, min), max);
}


public static double clamp(double num, double min, double max) {
if (num < min) {
return min;
} else {
return num > max ? max : num;
}
}

public static float wrapDegrees(float value) {
value = value % 360.0F;

if (value >= 180.0F) {
value -= 360.0F;
}

if (value < -180.0F) {
value += 360.0F;
}

return value;
}

public static float Rotate(float from, float to, float minstep, float maxstep) {

float f = wrapDegrees(to - from) * clamp(0.95f, 0, 1);

if (f < 0) {
f = clamp(f, -maxstep, -minstep);
} else {
f = clamp(f, minstep, maxstep);
}
if (Math.abs(f) > Math.abs(wrapDegrees(to - from)))
return to;

return from + f;
}

public static float Rotate(float from, float to, float step) {
return from + step * wrapDegrees(to - from);
}

// Метод Rotate
public float Rotate2(float value, float target, int axis, float maxRotation, double offsetY) {
float diff = MathHelper.wrapDegrees(target - value);
float sign = Math.signum(diff);
float rotation = Math.min(Math.abs(diff), maxRotation) * sign;
value += rotation + (axis == 1 ? offsetY : 0);
switch (axis) {
case 0: // Yaw
break;
case 1: // Pitch
value = MathHelper.clamp(value, -90.0F, 90.0F);
break;
default:
break;
}
return MathHelper.wrapDegrees(value);
}

public static Number interpolate(double oldValue, double newValue, double interpolationValue) {
return (oldValue + (newValue - oldValue) * interpolationValue);
}

public static Vector3d getInterpolatedPos(Entity entity, double ticks) {
double x = interpolate(entity.prevPosX, entity.getPosX(), ticks).doubleValue();
double y = interpolate(entity.prevPosY, entity.getPosY(), ticks).doubleValue();
double z = interpolate(entity.prevPosZ, entity.getPosZ(), ticks).doubleValue();
return new Vector3d(x, y, z);
}

}
 
Забаненный
Статус
Оффлайн
Регистрация
14 Июн 2024
Сообщения
30
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
1719051970316.png
 
Забаненный
Статус
Оффлайн
Регистрация
14 Июн 2024
Сообщения
30
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Онлайн
Регистрация
8 Мар 2024
Сообщения
562
Реакции[?]
2
Поинты[?]
2K
Сверху Снизу