Начинающий
- Статус
- Оффлайн
- Регистрация
- 12 Янв 2025
- Сообщения
- 37
- Реакции
- 0
- Выберите загрузчик игры
- ForgeOptiFine
Всем ку, сливаю таргетесп с черепом для експ3.1 наху
//модер не удаляй тему по причине мусор пж, сливали для 2.0 а я для 3.1
SS-
DW(image)-
//модер не удаляй тему по причине мусор пж, сливали для 2.0 а я для 3.1
SS-
Пожалуйста, авторизуйтесь для просмотра ссылки.
DW(image)-
Пожалуйста, авторизуйтесь для просмотра ссылки.
package fun.rassvet.functions.impl.render;
import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import fun.rassvet.events.EventDisplay;
import fun.rassvet.events.EventDisplay.Type;
import fun.rassvet.functions.api.Category;
import fun.rassvet.functions.api.Function;
import fun.rassvet.functions.api.FunctionRegister;
import fun.rassvet.functions.impl.combat.AttackAura;
import fun.rassvet.functions.settings.Setting;
import fun.rassvet.functions.settings.impl.ModeSetting;
import fun.rassvet.functions.settings.impl.SliderSetting;
import fun.rassvet.utils.math.Vector4i;
import fun.rassvet.utils.projections.ProjectionUtil;
import fun.rassvet.utils.render.ColorUtils;
import fun.rassvet.utils.render.DisplayUtils;
@FunctionRegister(
name = "TargetESP",
type = Category.Render
)
public class TargetESP extends Function {
private final AttackAura attackAura;
public ModeSetting mod = new ModeSetting("Мод", "Client", new String[]{"Client", "Призраки","Wexside"});
public SliderSetting speed = new SliderSetting("Скорость", 3.0F, 0.7F, 9.0F, 1.0F);
public SliderSetting size = new SliderSetting("Размер", 30.0F, 5.0F, 140.0F, 1.0F);
public SliderSetting bright = new SliderSetting("Яркость", 255.0F, 1.0F, 255.0F, 1.0F);
public TargetESP(AttackAura attackAura) {
this.attackAura = attackAura;
this.addSettings(new Setting[]{this.mod, this.speed, this.size, this.bright});
}
@Subscribe
private void onDisplay(EventDisplay e) {
if (this.mod.is("Client")) {
if (e.getType() != Type.PRE) {
return;
}
if (this.attackAura.isState() && this.attackAura.getTarget() != null) {
double sin = Math.sin((double)System.currentTimeMillis() / 1000.0);
float size = 70.0F;
Vector3d interpolated = this.attackAura.getTarget().getPositon(e.getPartialTicks());
Vector2f pos = ProjectionUtil.project(interpolated.x, interpolated.y + (double)(this.attackAura.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();
}
}
if (this.mod.is("Wexside")) {
if (e.getType() != Type.PRE) {
return;
}
if (this.attackAura.isState() && this.attackAura.getTarget() != null) {
float size = 65.0F;
Vector3d interpolated = this.attackAura.getTarget().getPositon(e.getPartialTicks());
Vector2f pos = ProjectionUtil.project(
interpolated.x,
interpolated.y + (double)(this.attackAura.getTarget().getHeight() / 2.0F),
interpolated.z
);
int transparency = 150;
int whiteWithAlpha = ColorUtils.setAlpha(ColorUtils.rgb(255, 255, 255), transparency);
DisplayUtils.drawImage(
new ResourceLocation("expensive/images/skull.png"),
pos.x - size / 2.0F,
pos.y - size / 2.0F,
size,
size,
new Vector4i(whiteWithAlpha, whiteWithAlpha, whiteWithAlpha, whiteWithAlpha)
);
}
}
if (this.mod.is("Призраки")) {
if (e.getType() != Type.PRE) {
return;
}
if (this.attackAura.isState() && this.attackAura.getTarget() != null) {
float speedi = (Float)this.speed.get();
float sizik = (Float)this.size.get();
int yarkost = ((Float)this.bright.get()).intValue();
double speed = (double)speedi;
double time = (double)System.currentTimeMillis() / (500.0 / speed);
double sin = Math.sin(time);
double cos = Math.cos(time);
float size = sizik;
int brightness = yarkost;
Vector3d headPos = this.attackAura.getTarget().getPositon(e.getPartialTicks()).add(0.0, (double)this.attackAura.getTarget().getHeight(), 0.0);
Vector3d bodyPos = this.attackAura.getTarget().getPositon(e.getPartialTicks()).add(0.0, (double)(this.attackAura.getTarget().getHeight() / 2.0F), 0.0);
Vector3d legPos = this.attackAura.getTarget().getPositon(e.getPartialTicks());
Vector3d[] upperPositions = new Vector3d[]{bodyPos.add(0.0, 0.5, 0.0)};
Vector3d[] lowerPositions = new Vector3d[]{legPos.add(0.0, 0.5, 0.0)};
ResourceLocation image = new ResourceLocation("expensive/images/glow.png");
for(int j = 0; j < 40; ++j) {
float alpha = (float)(brightness - j * 5);
if (alpha < 0.0F) {
alpha = 0.0F;
}
float trailSize = size * (1.0F - (float)j * 0.02F);
double trailTime = time - (double)j * 0.1;
double trailSin = Math.sin(trailTime);
double trailCos = Math.cos(trailTime);
float angleOffset = (float)j * 7.2F;
int i;
Vector3d pos3d;
Vector2f pos;
for(i = 0; i < upperPositions.length; ++i) {
pos3d = upperPositions.add(0.0, Math.sin(trailTime) * 0.26, 0.0);
pos = ProjectionUtil.project(pos3d.x + trailCos * 0.5, pos3d.y, pos3d.z + trailSin * 0.5);
GlStateManager.pushMatrix();
GlStateManager.translatef(pos.x, pos.y, 0.0F);
GlStateManager.rotatef((float)(trailSin * 360.0 + (double)(i * 180) + (double)angleOffset), 0.0F, 0.0F, 1.0F);
GlStateManager.translatef(-pos.x, -pos.y, 0.0F);
DisplayUtils.drawImage(image, pos.x - trailSize / 2.0F, pos.y - trailSize / 2.0F, trailSize, trailSize, new Vector4i(ColorUtils.setAlpha(HUD.getColor(0, 1.0F), (int)alpha), ColorUtils.setAlpha(HUD.getColor(90, 1.0F), (int)alpha), ColorUtils.setAlpha(HUD.getColor(180, 1.0F), (int)alpha), ColorUtils.setAlpha(HUD.getColor(270, 1.0F), (int)alpha)));
GlStateManager.popMatrix();
}
for(i = 0; i < lowerPositions.length; ++i) {
pos3d = lowerPositions.add(0.0, Math.sin(trailTime) * 0.26, 0.0);
pos = ProjectionUtil.project(pos3d.x - trailCos * 0.5, pos3d.y, pos3d.z - trailSin * 0.5);
GlStateManager.pushMatrix();
GlStateManager.translatef(pos.x, pos.y, 0.0F);
GlStateManager.rotatef((float)(-trailSin * 360.0 + (double)(i * 180) + (double)angleOffset), 0.0F, 0.0F, 1.0F);
GlStateManager.translatef(-pos.x, -pos.y, 0.0F);
DisplayUtils.drawImage(image, pos.x - trailSize / 2.0F, pos.y - trailSize / 2.0F, trailSize, trailSize, new Vector4i(ColorUtils.setAlpha(HUD.getColor(0, 1.0F), (int)alpha), ColorUtils.setAlpha(HUD.getColor(90, 1.0F), (int)alpha), ColorUtils.setAlpha(HUD.getColor(180, 1.0F), (int)alpha), ColorUtils.setAlpha(HUD.getColor(270, 1.0F), (int)alpha)));
GlStateManager.popMatrix();
}
}
}
}
}
}