Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Визуальная часть Nursultan skeed targetesp "Души" night 1.1.3\excellent

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
10 Янв 2025
Сообщения
123
Реакции
0
Выберите загрузчик игры
  1. Прочие моды
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;           
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f;  
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
 
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;          
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f; 
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
/del Ваще не похоже + уродство,кстати твой дизайн тоже уродство :roflanBuldiga:
 
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;          
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f; 
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
Бля пиздей тип гпт делает худ и клик гуи
 
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;          
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f; 
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
норм
 
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;          
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f; 
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
смысл?,в том же newcode(monoton) есть 1 в 1 по траектории призраки из нурика,просто там надо настроить длину,ширину и тд
 
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;          
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f; 
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
спастить с джавелина - неееее
гпткодировать - еееее
 
версия немножко кривая тк я не умсею писать рендер,есть трейл кривой так же пару багов а так +- норм
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

это должен был быть скид нурпукана но чет не оч получилось но за то прикольно:)
сам код -
Код:
Expand Collapse Copy
 private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
        final float baseSizePx = 0.19f;
        final float radius = 0.7f;          
        final int trailLength = 55;
        final EntityRendererManager rm = mc.getRenderManager();
        final ActiveRenderInfo camera = rm.info;
        final Quaternion rotation = camera.getRotation().copy();
        final double camX = camera.getProjectedView().x;
        final double camY = camera.getProjectedView().y;
        final double camZ = camera.getProjectedView().z;
        final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
        final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
        final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
        boolean isHurt = target.hurtTime > 0;
        float baseSpeed = 1.0f;
        float hurtSpeedBonus = 0f;
        if (isHurt) {
            hurtSpeedBonus = 0.2f;
            lastHurtTime = target.hurtTime;
            lastHurtTimeMs = System.currentTimeMillis();
        } else if (lastHurtTime > 0) {
            long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
            if (timeSinceHurt < 300) {
                hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
            } else {
                lastHurtTime = 0;
                hurtSpeedBonus = 0f;
            }
        }
        float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
        final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
        final float aPC = this.alpha.get();
        float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
        long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
        float afterHurtRed = 0f;
        if (timeSinceHurt < 200 && lastHurtTime > 0) {
            afterHurtRed = 1f - (timeSinceHurt / 200f);
        }
        hurtFactor = Math.max(hurtFactor, afterHurtRed);
        final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
        final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
        final float[] baseHeights = {
                target.getHeight() * 0.85f,
                target.getHeight() * 0.55f,
                target.getHeight() * 0.25f
        };
        final double[] angles = {
                Math.toRadians(0),
                Math.toRadians(120),
                Math.toRadians(240)
        };
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        List<Vector3d>[] trails = new List[]{
                phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
                phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
        };
        for (int k = 0; k < 3; k++) {
            float verticalAmp = 0.16f + (hurtFactor * 0.08f);
            double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
            double height = baseHeights[k] + verticalMove;
            float rotBaseSpeed = 1.3f;
            float rotBonus = hurtSpeedBonus * 0.5f;
            double rotSpeed = t * (rotBaseSpeed + rotBonus);
            double angle = angles[k] + rotSpeed;
            double baseX = Math.cos(angle) * radius;
            double baseZ = Math.sin(angle) * radius;
            Vector3d currentWorldPos = new Vector3d(
                    bx + baseX + camX,
                    by + height + camY,
                    bz + baseZ + camZ
            );
            List<Vector3d> trail = trails[k];
            trail.add(0, currentWorldPos);
            while (trail.size() > trailLength) {
                trail.remove(trail.size() - 1);
            }
            for (int j = 0; j < trail.size(); j++) {
                Vector3d pos = trail.get(j);
                float progress = j / (float) trailLength;
                float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
                float sizeFactor = 1.0f - progress * 0.5f;
                float dynSize = baseSizePx * sizeFactor;
                int dynAlpha = (int) (255 * aPC * alphaMul);
                int baseColor;
                if (hurtFactor > 0.05f) {
                    int r = 255;
                    int g = 80 + (int)(80 * (1 - hurtFactor));
                    int b = 80 + (int)(80 * (1 - hurtFactor));
                    baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
                } else {
                    baseColor = ColorUtil.fade(j * 3 + k * 40);
                    baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
                }
                int color = ColorUtil.replAlpha(
                        ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
                        MathHelper.clamp(dynAlpha, 0, 255)
                );
                ms.push();
                ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
                ms.rotate(rotation);
                RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
                float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
                int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
                int haloColor = ColorUtil.replAlpha(color, haloAlpha);
                RectUtil.drawRect(ms,
                        -glowSize, -glowSize,
                        glowSize * 2, glowSize * 2,
                        haloColor, haloColor, haloColor, haloColor,
                        true, true);
                RectUtil.drawRect(ms,
                        -dynSize, -dynSize,
                        dynSize * 2, dynSize * 2,
                        color, color, color, color,
                        true, true);
                ms.pop();
            }
        }
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
    }
    private int lastHurtTime = 0;
    private long lastHurtTimeMs = 0;
private void renderNursultanSouls(LivingEntity target, MatrixStack ms, float partialTicks) {
final float baseSizePx = 0.19f;
final float radius = 0.7f; 
final int trailLength = 55;
final EntityRendererManager rm = mc.getRenderManager();
final ActiveRenderInfo camera = rm.info;
 final Quaternion rotation = camera.getRotation().copy();
final double camX = camera.getProjectedView().x;
final double camY = camera.getProjectedView().y;
final double camZ = camera.getProjectedView().z;
final double bx = MathHelper.lerp(partialTicks, target.lastTickPosX, target.getPosX()) - camX;
final double by = MathHelper.lerp(partialTicks, target.lastTickPosY, target.getPosY()) - camY;
final double bz = MathHelper.lerp(partialTicks, target.lastTickPosZ, target.getPosZ()) - camZ;
boolean isHurt = target.hurtTime > 0;
float baseSpeed = 1.0f;
float hurtSpeedBonus = 0f;
 if (isHurt) {
hurtSpeedBonus = 0.2f;
lastHurtTime = target.hurtTime;
lastHurtTimeMs = System.currentTimeMillis();
} else if (lastHurtTime > 0) {
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
if (timeSinceHurt < 300) {
hurtSpeedBonus = 0.2f * (1f - timeSinceHurt / 300f);
} else {
lastHurtTime = 0;
hurtSpeedBonus = 0f;
        }
    }
 float currentSpeedMultiplier = baseSpeed + hurtSpeedBonus;
final double t = System.currentTimeMillis() / (350.0 / currentSpeedMultiplier);
final float aPC = this.alpha.get();
float hurtFactor = MathHelper.clamp(target.hurtTime / 10f, 0f, 1f);
long timeSinceHurt = System.currentTimeMillis() - lastHurtTimeMs;
float afterHurtRed = 0f;
if (timeSinceHurt < 200 && lastHurtTime > 0) {
afterHurtRed = 1f - (timeSinceHurt / 200f);
    }
hurtFactor = Math.max(hurtFactor, afterHurtRed);
final int red = ColorUtil.getColor(255, 80, 80, (int) (255 * aPC));
final float hurtPC = (float) Math.sin(target.hurtTime * (18F * Math.PI / 180F));
 final float[] baseHeights = {
target.getHeight() * 0.85f,
target.getHeight() * 0.55f,
target.getHeight() * 0.25f
    };
 final double[] angles = {
Math.toRadians(0),
Math.toRadians(120),
Math.toRadians(240)
    };
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_DEPTH_TEST);
List<Vector3d>[] trails = new List[]{
phantomTrail1.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail2.computeIfAbsent(target, k -> new ArrayList<>()),
phantomTrail3.computeIfAbsent(target, k -> new ArrayList<>())
    };
for (int k = 0; k < 3; k++) {
float verticalAmp = 0.16f + (hurtFactor * 0.08f);
double verticalMove = Math.sin(t * 1.5 + k * 2.0) * verticalAmp;
 double height = baseHeights[k] + verticalMove;
float rotBaseSpeed = 1.3f;
float rotBonus = hurtSpeedBonus * 0.5f;
 double rotSpeed = t * (rotBaseSpeed + rotBonus);
 double angle = angles[k] + rotSpeed;
double baseX = Math.cos(angle) * radius;
double baseZ = Math.sin(angle) * radius;
Vector3d currentWorldPos = new Vector3d(
                bx + baseX + camX,
                by + height + camY,
                bz + baseZ + camZ
        );
        List<Vector3d> trail = trails[k];
trail.add(0, currentWorldPos);
 while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
        }
for (int j = 0; j < trail.size(); j++) {
            Vector3d pos = trail.get(j);
float progress = j / (float) trailLength;
float alphaMul = (float) Math.pow(1.0f - progress, 1.5);
float sizeFactor = 1.0f - progress * 0.5f;
 float dynSize = baseSizePx * sizeFactor;
int dynAlpha = (int) (255 * aPC * alphaMul);
 int baseColor;
if (hurtFactor > 0.05f) {
int r = 255;
int g = 80 + (int)(80 * (1 - hurtFactor));
int b = 80 + (int)(80 * (1 - hurtFactor));
baseColor = ColorUtil.getColor(r, g, b, dynAlpha);
} else {
baseColor = ColorUtil.fade(j * 3 + k * 40);
baseColor = ColorUtil.replAlpha(baseColor, dynAlpha);
            }
int color = ColorUtil.replAlpha(
ColorUtil.overCol(baseColor, red, hurtPC * hurtFactor),
MathHelper.clamp(dynAlpha, 0, 255)
            );
            ms.push();
ms.translate(pos.x - camX, pos.y - camY, pos.z - camZ);
            ms.rotate(rotation);
RenderUtil.bindTexture(new Namespaced("texture/glow.png"));
float glowSize = dynSize * (1.3f + hurtFactor * 0.3f);
int haloAlpha = (int) (dynAlpha * (0.4f + hurtFactor * 0.2f));
int haloColor = ColorUtil.replAlpha(color, haloAlpha);
RectUtil.drawRect(ms,
                    -glowSize, -glowSize,
glowSize * 2, glowSize * 2,
                    haloColor, haloColor, haloColor, haloColor,
true, true);
RectUtil.drawRect(ms,
                    -dynSize, -dynSize,
dynSize * 2, dynSize * 2,
                    color, color, color, color,
true, true);
            ms.pop();
        }
    }
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
}
private int lastHurtTime = 0;
private long lastHurtTimeMs = 0;
if (aura.targetType.is("Nursultan")) {
if (target != null && alpha.get() > 0.01f) {
updateHurtState(target);
        renderNursultanSouls(target, e.getMatrix(), e.getPartialTicks());
    }
}
имба брат
 
выключи компьютер я тебя прошу и больше не включай его никогда
покажешь свои работы?
/del Ваще не похоже + уродство,кстати твой дизайн тоже уродство :roflanBuldiga:
а если он мне нравится:roflanBuldiga:
спастить с джавелина - неееее
гпткодировать - еееее
пастить с 1.21,вау
смысл?,в том же newcode(monoton) есть 1 в 1 по траектории призраки из нурика,просто там надо настроить длину,ширину и тд
так я пытался сделать скид сам,смысл мне открывать ЧУЖОЙ сурс и пастить и сливать,это похоже как в востленде эти призраки
 
покажешь свои работы?

а если он мне нравится:roflanBuldiga:

пастить с 1.21,вау

так я пытался сделать скид сам,смысл мне открывать ЧУЖОЙ сурс и пастить и сливать,это похоже как в востленде эти призраки
xD
 
Назад
Сверху Снизу