Начинающий
- Статус
- Оффлайн
- Регистрация
- 1 Фев 2024
- Сообщения
- 175
- Реакции
- 0
- Выберите загрузчик игры
- Vanilla
- Прочие моды
Сразу скажу код не мой
Я раздекопилил 1 клиент нацеленый под спуки
База вроде бы 3.1
Ротация похоже чуть на нурика вроде, не смотрел
Я раздекопилил 1 клиент нацеленый под спуки
База вроде бы 3.1
Ротация похоже чуть на нурика вроде, не смотрел
Java:
public void setRotate() {
// исходная цель/предсказание позиции
Vector3d vec = (Boolean) this.predict.get() && target != null
? this.getPredictedPosition(target, 0.18F)
: target.getPositionVec();
// корректировка по высоте (общая для исходного блока)
double eyeDiff = Minecraft.player.getPosYEye() - target.getPosY();
double maxYOffset = target.getHeight() - (Minecraft.player.getDistanceEyePos(target) / this.attackDistance());
vec = vec.add(0.0, MathHelper.clamp(eyeDiff, 0.0, maxYOffset), 0.0).subtract(Minecraft.player.getEyePosition(1.0F));
this.isRotated = true;
float yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0);
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 yaw = this.rotateVector.x;
float pitch = this.rotateVector.y;
switch ((String) this.type.get()) {
case "FunTimeTEST": {
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.0F), 59.0F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.0F), 79.4F);
float time = (float) (System.currentTimeMillis() % 10000L) / 570.0F;
float smoothShakeYaw = 6.0F * (float) Math.sin(time * 7.0F);
yaw = this.rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw) + smoothShakeYaw;
pitch = MathHelper.clamp(this.rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch), -180.0F, 180.0F);
if (!this.shouldPlayerFalling()) {
yaw = this.rotateVector.x + (Minecraft.player.rotationYaw - this.rotateVector.x) / 2.0F + smoothShakeYaw;
pitch = MathHelper.clamp(this.rotateVector.y + (-59.0F - this.rotateVector.y) / 2.0F, -87.0F, 87.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) options.getValueByName("Коррекция движения").get()) {
Minecraft.player.rotationYawOffset = yaw;
}
break;
}
case "Spookytime": {
Vector3d v = target.getPositionVec();
double eyeDiff2 = Minecraft.player.getPosYEye() - target.getPosY();
double maxYOffset2 = target.getHeight() * (Minecraft.player.getDistanceEyePos(target) / this.attackDistance());
v = v.add(0.0, MathHelper.clamp(eyeDiff2, 0.0, maxYOffset2), 0.0).subtract(Minecraft.player.getEyePosition(1.0F));
float yTo = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(v.z, v.x)) - 90.0);
float pTo = (float) (-Math.toDegrees(Math.atan2(v.y, Math.hypot(v.x, v.z))));
float yDelta = MathHelper.wrapDegrees(yTo - this.rotateVector.x);
float pDelta = MathHelper.wrapDegrees(pTo - this.rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yDelta), 0.0F), 91.8F);
float clampedPitch = Math.min(Math.max(Math.abs(pDelta), 0.0F), 25.3F);
float targetYaw = this.rotateVector.x + (yDelta > 0.0F ? clampedYaw : -clampedYaw);
float targetPitch = this.rotateVector.y + (pDelta > 0.0F ? clampedPitch : -clampedPitch);
float lerp = 0.687F;
yaw = this.rotateVector.x + (targetYaw - this.rotateVector.x) * lerp;
pitch = this.rotateVector.y + (targetPitch - this.rotateVector.y) * lerp;
float time = (float) (System.currentTimeMillis() % 10000L) / 1180.0F;
yaw += (float) Math.sin((double) (time * 2.0F) * Math.PI * 3.0) * 6.4F;
pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
float gcd2 = SensUtils.getGCDValue();
yaw -= (yaw - this.rotateVector.x) % gcd2;
pitch -= (pitch - this.rotateVector.y) % gcd2;
this.rotateVector = new Vector2f(yaw, pitch);
if ((Boolean) options.getValueByName("Коррекция движения").get()) {
Minecraft.player.rotationYawOffset = yaw;
}
break;
}
case "Custom": {
Vector3d v = (Boolean) this.predict.get() && target != null
? this.getPredictedPosition2(target, 0.34F)
: target.getPositionVec();
double eyeDiff3 = Minecraft.player.getPosYEye() - target.getPosY();
double maxYOffset3 = target.getHeight() - (Minecraft.player.getDistanceEyePos(target) / this.attackDistance());
v = v.add(0.0, MathHelper.clamp(eyeDiff3, 0.0, maxYOffset3), 0.0).subtract(Minecraft.player.getEyePosition(1.0F));
float yTo = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(v.z, v.x)) - 90.0);
float pTo = (float) (-Math.toDegrees(Math.atan2(v.y, Math.hypot(v.x, v.z))));
float yDelta = MathHelper.wrapDegrees(yTo - this.rotateVector.x);
float pDelta = MathHelper.wrapDegrees(pTo - this.rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yDelta), 0.0F), 60.8F);
float clampedPitch = Math.min(Math.max(Math.abs(pDelta), 0.0F), 10.0F);
float tYaw = this.rotateVector.x + (yDelta > 0.0F ? clampedYaw : -clampedYaw);
float tPitch = this.rotateVector.y + (pDelta > 0.0F ? clampedPitch : -clampedPitch);
float lerp = 0.687F;
yaw = this.rotateVector.x + (tYaw - this.rotateVector.x) * lerp;
pitch = this.rotateVector.y + (tPitch - this.rotateVector.y) * lerp;
float time = (float) (System.currentTimeMillis() % 10000L) / 900.0F;
yaw += (float) Math.sin((double) (time * 2.0F) * Math.PI * 2.7) * 7.8F;
pitch += (float) Math.sin((double) (time * 2.0F) * Math.PI * 2.9) * 4.0F;
pitch = MathHelper.clamp(pitch, -89.0F, 89.0F);
float gcd3 = SensUtils.getGCDValue();
yaw -= (yaw - this.rotateVector.x) % gcd3;
pitch -= (pitch - this.rotateVector.y) % gcd3;
this.rotateVector = new Vector2f(yaw, pitch);
if ((Boolean) options.getValueByName("Коррекция движения").get()) {
Minecraft.player.rotationYawOffset = yaw;
}
break;
}
case "Advance": {
float predictStrength = 0.57F;
Vector3d predictedPos = this.getPredictedPosition2(target, predictStrength);
double stableY = target.getPosY() + target.getHeight();
predictedPos = new Vector3d(predictedPos.x, stableY, predictedPos.z).subtract(Minecraft.player.getEyePosition(1.0F));
float yTo = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(predictedPos.z, predictedPos.x)) - 90.0);
float pTo = (float) (-Math.toDegrees(Math.atan2(predictedPos.y, Math.hypot(predictedPos.x, predictedPos.z))));
float yDelta = MathHelper.wrapDegrees(yTo - this.rotateVector.x);
float pDelta = MathHelper.wrapDegrees(pTo - this.rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yDelta), 0.0F), 66.7F);
float clampedPitch = Math.min(Math.max(Math.abs(pDelta), 0.0F), 7.2F);
float tYaw = this.rotateVector.x + (yDelta > 0.0F ? clampedYaw : -clampedYaw);
float tPitch = this.rotateVector.y + (pDelta > 0.0F ? clampedPitch : -clampedPitch);
float lerp = 0.717F;
yaw = this.rotateVector.x + (tYaw - this.rotateVector.x) * lerp;
pitch = this.rotateVector.y + (tPitch - this.rotateVector.y) * lerp;
float time = (float) (System.currentTimeMillis() % 10000L) / 1120.0F;
yaw += (float) Math.sin((double) (time * 2.0F) * Math.PI * 3.0) * 8.4F;
pitch += (float) Math.sin((double) (time * 2.0F) * Math.PI * 2.9) * 2.5F;
pitch = MathHelper.clamp(pitch, -90.0F, 85.0F);
float gcd4 = SensUtils.getGCDValue();
yaw -= (yaw - this.rotateVector.x) % gcd4;
pitch -= (pitch - this.rotateVector.y) % gcd4;
this.rotateVector = new Vector2f(yaw, pitch);
if ((Boolean) options.getValueByName("Коррекция движения").get()) {
Minecraft.player.rotationYawOffset = yaw;
}
break;
}
default: {
float gcd = SensUtils.getGCDValue();
yaw = yawToTarget - (yawToTarget - this.rotateVector.x) % gcd;
pitch = MathHelper.clamp(pitchToTarget - (pitchToTarget - this.rotateVector.y) % gcd, -89.0F, 90.0F);
this.rotateVector = new Vector2f(yaw, pitch);
if ((Boolean) options.getValueByName("Коррекция движения").get()) {
Minecraft.player.rotationYawOffset = yaw;
}
break;
}
}
}
и ротация обходит 1 спуки таймик, а точто там ротация funtime test это обычные снапы которые смотрят вверх
иди лучше у аегиса(no ad) ротацию возьму под фт чучуть переделайи сливай :) и не притворяйся "жестки крякером" раздекопил он джарку в которой нет обфы ты сильный xDDDD