package client.toshiba.utils.features.aura.rotations.impl;
import client.toshiba.Toshiba;
import client.toshiba.features.impl.combat.AttackAura;
import client.toshiba.utils.features.aura.rotations.constructor.RotateConstructor;
import client.toshiba.utils.features.aura.striking.StrikeManager;
client.toshiba.utils.features.aura.utils.MathAngle'ı içe aktarın;
import client.toshiba.utils.features.aura.warp.Turns;
import client.toshiba.utils.math.time.StopWatch;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.Box;
net.minecraft.util.math.MathHelper'ı içe aktarın;
import net.minecraft.util.math.Vec3d;
java.security.SecureRandom'ı içe aktar;
public class SlothAngle extends RotateConstructor {
public SlothAngle() {
süper("CakeWorld");
}
@Geçersiz Kıl
public Turns limitAngleChange(Turns currentAngle, Turns targetAngle, Vec3d vec3d, Entity entity) {
StrikeManager attackHandler = Toshiba.getInstance().getAttackPerpetrator().getAttackHandler();
AttackAura aura = AttackAura.getInstance();
StopWatch attackTimer = attackHandler.getAttackTimer();
Dönüş açısı = MathAngle.calculateDelta(currentAngle, targetAngle);
float yawDelta = angleDelta.getYaw(), pitchDelta = angleDelta.getPitch();
float rotationDifference = (float) Math.hypot(Math.abs(yawDelta), Math.abs(pitchDelta));
boolean canAttack = entity != null && attackHandler.canAttack(aura.getConfig(), 0);
float distanceToTarget = 0;
if (entity != null) {
distanceToTarget = (float) mc.player.distanceTo(entity);
}
float baseSpeed = canAttack ? 0.75F : 0.65F;
kayan nokta hızı = temel hız;
Eğer (hedefe uzaklık > 0 ve hedefe uzaklık < 0,66F) ise {
float closeRangeSpeed = MathHelper.clamp(distanceToTarget / 1.5F * 0.35F, 0.1F, 0.6F);
hız = saldırı yapabilir ? 0,85f : Math.min(hız, yakın menzil hızı);
}
float lineYaw = (Math.abs(yawDelta / rotationDifference) * 180);
float linePitch = (Math.abs(pitchDelta / rotationDifference) * 180);
float jitterYaw = canAttack ? 0 : (float) (randomLerp(21, 28.2f) * Math.sin(System.currentTimeMillis() / 20D));
float jitterPitch = canAttack ? 0 : (float) (randomLerp(6, 23.8f) * Math.sin(System.currentTimeMillis() / 22D));
if ((!aura.isState() || aura.getTarget() == null) && attackHandler.getAttackTimer().finished(1000)) {
temel Hız = 0,55F;
jitterYaw = 0;
titreşim aralığı = 0;
}
float moveYaw = MathHelper.clamp(yawDelta, -lineYaw, lineYaw);
float movePitch = MathHelper.clamp(pitchDelta, -linePitch, linePitch);
Turns moveAngle = new Turns(currentAngle.getYaw(), currentAngle.getPitch());
moveAngle.setYaw(MathHelper.lerp(baseSpeed, currentAngle.getYaw(), currentAngle.getYaw() + moveYaw) + jitterYaw);
moveAngle.setPitch(MathHelper.lerp(baseSpeed, currentAngle.getPitch(), currentAngle.getPitch() + movePitch) + jitterPitch);
moveAngle'ı döndür;
}
public static float lerp(float delta, float start, float end) {
Sonu döndür;
}
özel float randomLerp(float min, float max) {
MathHelper.lerp(new SecureRandom().nextFloat(), min, max) değerini döndürün;
}
@Geçersiz Kıl
public Vec3d randomValue() {
Yeni bir Vec3d nesnesi döndür (0.01, 0.07, 0.02);
}
}