Начинающий
- Статус
- Оффлайн
- Регистрация
- 14 Сен 2025
- Сообщения
- 13
- Реакции
- 0
- Выберите загрузчик игры
- Fabric
Пожалуйста, авторизуйтесь для просмотра ссылки.
code -
Java:
public void drawGhosts(LivingEntity lastTarget, float anim, float red, float speed) {
Camera camera = mc.getEntityRenderDispatcher().camera;
Vec3d vec = MathUtil.interpolate(lastTarget).subtract(camera.getPos());
boolean canSee = mc.player.canSee(lastTarget);
double iAge = MathUtil.interpolate(mc.player.age - 1, mc.player.age);
float halfHeight = lastTarget.getHeight() / 2 + 0.1F;
float width = lastTarget.getWidth();
float[] heightOffsets = {halfHeight * 0.6f, -halfHeight * 0.6f, 0f};
float[] radiusMultipliers = {1.35f, 1.35f, 1.27f};
float[] tiltAngles = {-15f, -15f, -15f};
float orbitSpeed = 2.5f;
float waveSpeed = 3.0f;
for (int j = 0; j < 3; j++) {
for (int i = 0, length = 11; i <= length; i++) {
double radians = Math.toRadians(((i / 1.8F + iAge * speed * orbitSpeed) * length + (j * 90)) % (length * 360));
if (j == 1) {
radians = -radians;
}
double sinQuad = Math.sin(Math.toRadians(iAge * waveSpeed * speed + i * (j / 2 + halfHeight)) * 5.5) / 3;
float offset = ((float) (i + length) / (length + length));
MatrixStack matrices = new MatrixStack();
matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(camera.getPitch()));
matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(camera.getYaw() + 180.0F));
float radius = width + 0.19f * radiusMultipliers[j];
matrices.translate(
vec.x + Math.cos(radians) * radius,
vec.y + halfHeight + sinQuad + heightOffsets[j] - 0.1,
vec.z + Math.sin(radians) * radius
);
matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-camera.getYaw()));
matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(camera.getPitch()));
matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(tiltAngles[j]));
MatrixStack.Entry entry = matrices.peek().copy();
int color = ColorUtil.multRedAndAlpha(ColorUtil.fade((int) offset * 180), 1 + red * 0, offset * anim * 1.8f);
float scale = 0.52f * offset;
Render3DUtil.drawTexture(entry, bloom, -scale / 3, -scale / 2, scale, scale, new Vector4i(color), false);
}
}
}