Начинающий
- Статус
- Оффлайн
- Регистрация
- 16 Дек 2025
- Сообщения
- 7
- Реакции
- 0
- Выберите загрузчик игры
- Forge
Не знаю сделал Киллауру вот вам код Для пастерков
SpookytimeRotation:
package dev.twohug.client.managers.module.impl.combat.rotation;
import dev.twohug.client.api.interfaces.IMinecraft;
import dev.twohug.client.managers.component.impl.rotation.Rotation;
import dev.twohug.client.managers.component.impl.rotation.RotationComponent;
import dev.twohug.client.managers.module.impl.combat.AttackAura;
import dev.twohug.client.utils.math.Mathf;
import dev.twohug.client.utils.rotation.AuraUtil;
import lombok.experimental.UtilityClass;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import ru.nocturneguard.J2C.Native;
import java.util.concurrent.ThreadLocalRandom;
import static dev.twohug.client.managers.module.impl.combat.AttackAura.*;
@UtilityClass
public class SpookyTimeRotation implements IMinecraft {
float tick = 0;
public void rotation(LivingEntity target, boolean isAttack, float attackDistance, boolean check) {
Vector3d playerEyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
float oscillY = (float) Math.cos(System.currentTimeMillis() /240L);
float offsetY = 0.046F * oscillY;
float oscillZ = (float) Math.cos(System.currentTimeMillis() / 150L);
float offsetZ = 0.06F * oscillZ;
Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
float timeVar = (float) Math.cos(System.currentTimeMillis() / 900L);
float addyVact = 0.15F * timeVar;
float timeVarZ = (float) Math.cos(System.currentTimeMillis() / 1100L);
float addyVacZ = 0.15F * timeVarZ;
float timeVarX = (float) Math.cos(System.currentTimeMillis() / 800L);
float addyVacX = 0.25F * timeVarX;
Vector3d directionVec = target.getPositionVec()
.add(addyVacZ, MathHelper.clamp(eyePos.y - target.getPosY(), 0.0F, 1F + addyVact), addyVacX)
.subtract(eyePos).normalize();
boolean attack = false;
if (isAttack) tick = 4;
if (tick > 0) {
attack = true;
tick--;
}
float baseYaw = (float) Math.toDegrees(Math.atan2(-directionVec.x, directionVec.z));
float basePitch = (float) MathHelper.clamp(
-Math.toDegrees(Math.atan2(directionVec.y, Math.hypot(directionVec.x, directionVec.z))),
MIN_PITCH, MAX_PITCH
);
float waveA = (float) Math.cos(System.currentTimeMillis() / 70D);
float waveB = (float) Math.sin(System.currentTimeMillis() / 80D);
float randomAttackShift = 0;
if (attack) {
randomAttackShift = ThreadLocalRandom.current().nextLong(-3, 3);
}
float yawJitter = ((float) (Math.random() * 2) * waveB ) + waveA * (float) (Math.random() * 3);
float pitchJitter = ((float) (Math.random() * 1) * waveA) + waveB * Mathf.smoothRandom(1,3,1);
boolean attackCooldownReady = AttackAura.getInstance().cooldownFromLastSwing() > CRIT_COOLDOWN_THRESHOLD;
float pitchChangeSpeed = Mathf.randomValue(3, 5);
float yawChangeSpeed = Mathf.randomValue(35, 45);
Rotation newRotation = new Rotation(baseYaw + yawJitter + randomAttackShift, basePitch + pitchJitter + randomAttackShift);
RotationComponent.update(newRotation, yawChangeSpeed, pitchChangeSpeed, Mathf.randomValue(11, 16), Mathf.randomValue(5, 7), 0, 15, false);
}
}
Пожалуйста, авторизуйтесь для просмотра ссылки.