Начинающий
- Статус
- Оффлайн
- Регистрация
- 18 Мар 2026
- Сообщения
- 12
- Реакции
- 0
case "СпукиТайм" -> {
// ===== MULTIPOINT =====
List<Vector3d> points = new ArrayList<>();
double eye = target.getEyeHeight();
points.add(target.getPositionVec().add(0, eye + 0.15, 0)); // голова верх
points.add(target.getPositionVec().add(0, eye - 0.05, 0)); // голова центр
points.add(target.getPositionVec().add(0, eye - 0.25, 0)); // шея
double shoulder = 0.25;
points.add(target.getPositionVec().add(shoulder, eye - 0.2, 0)); // правое плечо
points.add(target.getPositionVec().add(-shoulder, eye - 0.2, 0)); // левое плечо
if (this.targetPoint == null) this.targetPoint = points.get(0);
if (this.currentPoint == null) this.currentPoint = targetPoint;
// смена точки
if (System.currentTimeMillis() - lastSwitchTime > 120 + Math.random() * 180) {
this.targetPoint = points.get((int) (Math.random() * points.size()));
this.lastSwitchTime = System.currentTimeMillis();
}
// плавный переход между точками
double lerpSpeed = 0.18 + Math.random() * 0.12;
this.currentPoint = new Vector3d(
currentPoint.x + (targetPoint.x - currentPoint.x) * lerpSpeed,
currentPoint.y + (targetPoint.y - currentPoint.y) * lerpSpeed,
currentPoint.z + (targetPoint.z - currentPoint.z) * lerpSpeed
);
// ===== РАСЧЁТ УГЛОВ =====
double diffX = currentPoint.x - mc.player.getPosX();
double diffY = currentPoint.y - (mc.player.getPosY() + mc.player.getEyeHeight());
double diffZ = currentPoint.z - mc.player.getPosZ();
float yawDeltaSpooky = (float)(Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0F - rotateVector.x);
float pitchDeltaSpooky = (float)(-Math.toDegrees(Math.atan2(diffY, Math.sqrt(diffX * diffX + diffZ * diffZ))) - rotateVector.y);
yawDeltaSpooky = MathHelper.wrapDegrees(yawDeltaSpooky);
pitchDeltaSpooky = MathHelper.wrapDegrees(pitchDeltaSpooky);
// ===== ТВОЯ ЛОГИКА (С НЕМНОГО УСИЛЕННОЙ ЖИЗНЕННОСТЬЮ) =====
float speedYaw = rotationYawSpeed * (0.95f + (float) Math.random() * 0.1f);
float speedPitch = rotationPitchSpeed * (0.95f + (float) Math.random() * 0.1f);
float clampedYaw = Math.min(Math.max(Math.abs(yawDeltaSpooky), 1.0f), speedYaw);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDeltaSpooky), 1.0f), speedPitch);
if (Math.random() > 0.7f) {
clampedYaw *= 0.5f + (float) Math.random() * 0.3f;
clampedPitch *= 0.4f + (float) Math.random() * 0.4f;
}
if (Math.abs(clampedYaw - this.lastYaw) <= 3.0f) {
float microNoise = (float) (Math.random() * 1.5f - 0.75f);
clampedYaw = this.lastYaw + 2.8f + microNoise;
}
if (attack && selected != target && options.getValueByName("Ускорять ротацию при атаке").get()) {
clampedPitch = Math.max(Math.abs(pitchDeltaSpooky), 1.0f);
} else {
clampedPitch /= 3.2f;
if (Math.abs(clampedPitch) < 0.5f) {
clampedPitch += (float) (Math.random() * 0.2f - 0.1f);
}
}
float currentYaw = rotateVector.x;
float currentPitch = rotateVector.y;
float targetYaw = currentYaw + (yawDeltaSpooky > 0 ? clampedYaw : -clampedYaw);
float targetPitch = clamp(currentPitch + (pitchDeltaSpooky > 0 ? clampedPitch : -clampedPitch), -89.0F, 89.0F);
// ===== ПЛАВНАЯ КРИВАЯ ДВИЖЕНИЯ =====
int pointsCount = 2 + (int) (Math.random() * 3);
float finalYaw = currentYaw;
float finalPitch = currentPitch;
for (int i = 0; i < pointsCount; i++) {
float t = (float) i / (pointsCount - 1);
float curve = (float) Math.sin(t * Math.PI);
float overshoot = curve * (2.0f + (float) Math.random() * 4.0f);
finalYaw = currentYaw + (targetYaw - currentYaw) * t;
finalPitch = currentPitch + (targetPitch - currentPitch) * t;
finalYaw += (float) (Math.random() * overshoot - overshoot / 2);
finalPitch += (float) (Math.random() * (overshoot * 0.5f) - (overshoot * 0.25f));
if (i == pointsCount - 1) {
finalYaw = targetYaw;
finalPitch = targetPitch;
}
}
// ===== МИКРОТРЯСКА (ВАЖНО) =====
float shakeYaw = (float) (Math.random() * 0.6f - 0.3f);
float shakePitch = (float) (Math.random() * 0.4f - 0.2f);
finalYaw += shakeYaw;
finalPitch += shakePitch;
// ===== GCD ФИКС =====
float gcd = SensUtils.getGCDValue();
float yaw = currentYaw + (float) ((int) ((finalYaw - currentYaw) / gcd)) * gcd;
float pitch = currentPitch + (float) ((int) ((finalPitch - currentPitch) / gcd)) * gcd;
double noiseAmount = 0.005f * gcd;
yaw += (float) (Math.random() * noiseAmount - noiseAmount / 2);
pitch += (float) (Math.random() * noiseAmount - noiseAmount / 2);
// ===== РЕДКИЕ МИКРОФРИЗЫ (КАК У ЧЕЛА) =====
if (Math.random() > 0.88f) {
try {
Thread.sleep((long) (15 + Math.random() * 40));
} catch (InterruptedException ignored) {}
}
rotateVector = new Vector2f(yaw, pitch);
lastYaw = clampedYaw + (float) (Math.random() * 0.5f - 0.25f);
lastPitch = clampedPitch + (float) (Math.random() * 0.5f - 0.25f);
if (applyMovementCorrection) {
mc.player.rotationYawOffset = yaw;
}
}
