Начинающий
- Статус
- Оффлайн
- Регистрация
- 28 Апр 2025
- Сообщения
- 12
- Реакции
- 0
Привет! Я ток недавно начал делать свою пасту и многое могу не знать или не понимать так как я в сфере кодинга софта неделю, хотел бы попросить у вас помощи в рендере душ из таргет есп вот SS
Если нужно то вот код
if (this.type.is("Призраки")) {
if (e.getType() != EventDisplay.Type.PRE) {
return;
}
if (this.killAura.isState() && this.killAura.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.killAura.getTarget().getPositon(e.getPartialTicks()).add(0.0, (double) this.killAura.getTarget().getHeight(), 0.0);
Vector3d bodyPos = this.killAura.getTarget().getPositon(e.getPartialTicks()).add(0.0, (double) (this.killAura.getTarget().getHeight() / 3.0F), 0.0);
Vector3d legPos = this.killAura.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();
}
}
}
}