- Выберите загрузчик игры
- OptiFine
- ForgeOptiFine
- Прочие моды
Ротация спукитайм дуэли 360 градусов, без банов
(
code:
(
Пожалуйста, авторизуйтесь для просмотра ссылки.
)code:
JavaScript:
private void baseRotationSpookytimeDuels() {
Vector3d vec = (Boolean)this.predict.get() && this.target != null ? this.getPredictedPosition(this.target, (Float)this.predictStrength.get()) : this.target.getPositionVec();
Minecraft var10002 = mc;
double var28 = Minecraft.player.getPosYEye() - this.target.getPosY();
double var10004 = (double)this.target.getHeight();
Minecraft var10006 = mc;
Vector3d var10000 = vec.add((double)0.0F, MathHelper.clamp(var28, (double)0.0F, var10004 - (double)1.0F * (Minecraft.player.getDistanceEyePos(this.target) / (double)this.attackDistance())), (double)0.0F);
Minecraft var10001 = mc;
vec = var10000.subtract(Minecraft.player.getEyePosition(1.0F));
this.isRotated = true;
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
float yawDelta = MathHelper.wrapDegrees(yawToTarget - this.rotateVector.x);
float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - this.rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 1.0F), 65.4F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), 10.2F);
float targetYaw = this.rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw);
float targetPitch = this.rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch);
float lerpFactor = 1.0F;
float yaw = this.rotateVector.x + (targetYaw - this.rotateVector.x) * lerpFactor;
float pitch = this.rotateVector.y + (targetPitch - this.rotateVector.y) * lerpFactor;
float time = (float)(System.currentTimeMillis() % 10000L) / 500.0F;
float oscillationAmplitudeYaw = 4.7F;
float oscillationFrequencyYaw = 2.8F;
float yawOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyYaw) * oscillationAmplitudeYaw;
yaw += yawOscillation;
float oscillationAmplitudePitch = 3.2F;
float oscillationFrequencyPitch = 1.6F;
float pitchOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyPitch) * oscillationAmplitudePitch;
pitch += pitchOscillation;
pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
float gcd = SensUtils.getGCDValue();
yaw -= (yaw - this.rotateVector.x) % gcd;
pitch -= (pitch - this.rotateVector.y) % gcd;
this.rotateVector = new Vector2f(yaw, pitch);
if ((Boolean)this.options.getValueByName("Коррекция движения").get()) {
Minecraft var27 = mc;
Minecraft.player.rotationYawOffset = yaw;
}
}