есть уже на юге, чекни гайды
видел перенес банит хуй знает че еще делать вот код
private void updateRotation(float rotationYawSpeed, float rotationPitchSpeed) {
if (target == null) return;
Vector3d playerEyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
float distanceToTarget = mc.player.getDistance(target);
float maxRange = attackRange.getValue().floatValue();
float distanceFactor = MathHelper.clamp(distanceToTarget / maxRange, 0.0f, 1.0f);
float targetHeight = 0.2f + (0.5f * distanceFactor);
targetHeight += 0.03f * (float) Math.sin(System.currentTimeMillis() / 600D);
targetHeight = MathHelper.clamp(targetHeight, 0.15f, 0.75f);
Vector3d targetPoint = target.getPositionVec().add(
0,
MathHelper.clamp(playerEyePos.y - target.getPosY(), 0.0F, targetHeight),
0
);
Vector3d direction = targetPoint.subtract(playerEyePos).normalize();
float targetYaw = (float) Math.toDegrees(Math.atan2(-direction.x, direction.z));
float targetPitch = (float) MathHelper.clamp(
-Math.toDegrees(Math.atan2(direction.y, Math.hypot(direction.x, direction.z))),
-90.0F, 90.0F
);
float currentYaw = lastYaw;
float currentPitch = lastPitch;
float yawDiff = wrapDegrees(targetYaw - currentYaw);
float pitchDiff = targetPitch - currentPitch;
float neuroRand1 = ThreadLocalRandom.current().nextFloat();
float neuroRand2 = ThreadLocalRandom.current().nextFloat();
float neuroRand3 = ThreadLocalRandom.current().nextFloat();
float neuroRand4 = ThreadLocalRandom.current().nextFloat();
float distanceFactor2;
if (distanceToTarget < 2.0f) {
distanceFactor2 = 0.9f + neuroRand1 * 0.5f;
} else if (distanceToTarget < 4.0f) {
distanceFactor2 = 1.4f + neuroRand2 * 0.7f;
} else {
distanceFactor2 = 1.1f + neuroRand3 * 0.6f;
}
float baseSpeed = MathHelper.clamp(distanceToTarget * 0.3f, 1.0f, 3.5f) * distanceFactor2;
float smoothFactorBase;
if (distanceToTarget < 3.0f && Math.abs(yawDiff) < 10.0f) {
smoothFactorBase = 0.1f + neuroRand2 * 0.014f;
} else if (distanceToTarget > 5.0f || Math.abs(yawDiff) > 30.0f) {
smoothFactorBase = 0.22f + neuroRand3 * 0.15f;
} else {
smoothFactorBase = 0.15f + neuroRand1 * 0.15f;
}
float smoothYaw = yawDiff * smoothFactorBase * (baseSpeed * 0.7f);
float smoothPitch = pitchDiff * smoothFactorBase * (baseSpeed * 0.6f);
if (neuroRand4 < 0.02f) {
smoothYaw += (ThreadLocalRandom.current().nextFloat() - 0.5f) * 1.2f;
smoothPitch += (ThreadLocalRandom.current().nextFloat() - 0.5f) * 0.8f;
}
float breathX = (float) Math.sin(System.currentTimeMillis() / 300.0) * 0.03f;
float breathY = (float) Math.cos(System.currentTimeMillis() / 500.0) * 0.02f;
smoothYaw += breathX;
smoothPitch += breathY;
if (ThreadLocalRandom.current().nextFloat() < 0.05f && Math.abs(yawDiff) > 5.0f) {
float overshootFactor = 1.1f + ThreadLocalRandom.current().nextFloat() * 0.3f;
smoothYaw *= overshootFactor;
}
float newYaw = currentYaw + smoothYaw;
float newPitch = currentPitch + smoothPitch;
newPitch = MathHelper.clamp(newPitch, -30F, 60F);
float gcd = SensitivityUtil.getSensValue();
float finalYaw = newYaw - (newYaw - currentYaw) % gcd;
float finalPitch = newPitch - (newPitch - currentPitch) % gcd;
if (Math.abs(finalYaw - currentYaw) < 0.01f && Math.abs(finalPitch - currentPitch) < 0.01f) {
finalYaw = currentYaw;
finalPitch = currentPitch;
}
lastYaw = finalYaw;
lastPitch = finalPitch;
rotateVector = new Vector2f(finalYaw, finalPitch);
RotationService.update(new Rotation(finalYaw, finalPitch), 300, 360, 4, 5);
}