Начинающий
- Статус
- Оффлайн
- Регистрация
- 26 Июн 2025
- Сообщения
- 91
- Реакции
- 1
Всем привет я делаю чит под спукитайм на базе Evaware но есть проблема
меня почему-то при ударах начинает флагать а потом спустя время банит
И я не могу понять эта сброс спринта виноват или же ротация или корреция движения не обходит пж помогите
меня почему-то при ударах начинает флагать а потом спустя время банит
SpookyTime Rotation:
package niva.free.modules.impl.combat.Rotation;
import niva.free.utils.math.SensUtility;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
public class onSpookytimeV2Rotation {
private Minecraft mc = Minecraft.getInstance();
private Vector2f rotate = new Vector2f(0, 0);
private LivingEntity selected;
private float lastYaw = 0;
private float lastPitch = 0;
private float currentMultiPointY = 0.5f;
private long lastPointSwitchTime = 0;
private float targetMultiPointY = 0.8f;
private long lastShakeUpdate = 0;
private float currentShakeYaw = 0;
private float currentShakePitch = 0;
public void onSpookyV2Rotation(LivingEntity target, boolean attack, LivingEntity selectedEntity) {
if (target == null || mc.player == null) return;
this.selected = selectedEntity;
long currentTime = System.currentTimeMillis();
if (currentTime - lastPointSwitchTime > 400 + (int)(Math.random() * 400)) {
targetMultiPointY = 0.2f + (float)(Math.random() * 0.6f);
lastPointSwitchTime = currentTime;
}
currentMultiPointY = currentMultiPointY + (targetMultiPointY - currentMultiPointY) * 0.08f;
AxisAlignedBB aabb = target.getBoundingBox();
Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
double aimX = MathHelper.clamp(eyePos.x, aabb.minX, aabb.maxX);
double aimY = MathHelper.clamp(eyePos.y,
aabb.minY + target.getHeight() * (currentMultiPointY - 0.1f),
aabb.minY + target.getHeight() * (currentMultiPointY + 0.1f));
double aimZ = MathHelper.clamp(eyePos.z, aabb.minZ, aabb.maxZ);
Vector3d vec = new Vector3d(aimX - eyePos.x, aimY - eyePos.y, aimZ - eyePos.z).normalize();
float targetYaw = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0);
float targetPitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))), -90.0F, 90.0F);
float yawDelta = MathHelper.wrapDegrees(targetYaw - this.rotate.x);
float pitchDelta = MathHelper.wrapDegrees(targetPitch - this.rotate.y);
float distance = (float) mc.player.getDistance(target);
float absYawDelta = Math.abs(yawDelta);
float absPitchDelta = Math.abs(pitchDelta);
float distanceFactor;
if (distance < 0.3f) {
distanceFactor = 0.3f;
} else if (distance < 1.2f) {
distanceFactor = 0.7f;
} else if (distance < 2.2f) {
distanceFactor = 1.0f;
} else if (distance < 4.0f) {
distanceFactor = 1.3f;
} else {
distanceFactor = 1.6f;
}
float randomSpeedYaw = 0.85f + (float)(Math.random() * 0.3f);
float randomSpeedPitch = 0.85f + (float)(Math.random() * 0.3f);
float yawDeltaFactor = MathHelper.clamp(absYawDelta / 30.0f, 0.4f, 1.2f);
float pitchDeltaFactor = MathHelper.clamp(absPitchDelta / 15.0f, 0.4f, 1.2f);
float maxYawTurn = 22.0f * distanceFactor * yawDeltaFactor * randomSpeedYaw;
float maxPitchTurn = 9.0f * distanceFactor * pitchDeltaFactor * randomSpeedPitch;
float clampedYaw = MathHelper.clamp(absYawDelta, 0.8f, maxYawTurn);
float clampedPitch = MathHelper.clamp(absPitchDelta, 0.5f, maxPitchTurn);
if (currentTime - lastShakeUpdate > 10 + (int)(Math.random() * 20)) {
currentShakeYaw = (float)((Math.random() - 0.5) * 1.4);
currentShakePitch = (float)((Math.random() - 0.5) * 0.8);
lastShakeUpdate = currentTime;
}
float shakeYaw = currentShakeYaw;
float shakePitch = currentShakePitch;
if (attack) {
shakeYaw *= 1.3f;
shakePitch *= 1.3f;
}
float lerpFactor = 0.9f + (float)(Math.random() * 0.1f);
float stepYaw = (yawDelta > 0.0F ? clampedYaw : -clampedYaw) * lerpFactor;
float stepPitch = (pitchDelta > 0.0F ? clampedPitch : -clampedPitch) * lerpFactor;
float newYaw = this.rotate.x + stepYaw + shakeYaw;
float newPitch = MathHelper.clamp(this.rotate.y + stepPitch + shakePitch, -80.0F, 70.0F);
float gcd = SensUtility.getGCDValue();
newYaw -= (newYaw - this.rotate.x) % gcd;
newPitch -= (newPitch - this.rotate.y) % gcd;
this.rotate = new Vector2f(newYaw, newPitch);
this.lastYaw = clampedYaw;
this.lastPitch = clampedPitch;
}
public void setSelected(LivingEntity selected) {
this.selected = selected;
}
public Vector2f getRotation() {
return this.rotate;
}
public void reset() {
if (mc.player != null) {
this.rotate = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
this.lastYaw = 0;
this.lastPitch = 0;
this.currentMultiPointY = 0.5f;
this.targetMultiPointY = 0.8f;
this.currentShakeYaw = 0;
this.currentShakePitch = 0;
}
}
}
Attack:
private void attack() {
int minCPSValue = ((Float)this.minCPS.getValue()).intValue();
int maxCPSValue = ((Float)this.maxCPS.getValue()).intValue();
if (minCPSValue > maxCPSValue) {
maxCPSValue = minCPSValue;
}
int minMS = 1000 / maxCPSValue;
int maxMS = 1000 / minCPSValue;
Random random = new Random();
int randomMS = random.nextInt(maxMS - minMS + 1) + minMS;
this.timerUtility.setLastMS(this.clickType.is("1.9") ? 500L : (long)randomMS);
Criticals.cancelCrit = true;
boolean wasSprinting = Minecraft.player.isSprinting();
if (this.sprintMode.is("Grim Old")) {
Minecraft.player.connection.sendPacket(new CEntityActionPacket(Minecraft.player, CEntityActionPacket.Action.STOP_SPRINTING));
}
if (this.sprintMode.is("Grim New") && wasSprinting) {
mc.playerController.attackEntity(Minecraft.player, this.target);
Minecraft.player.swingArm(Hand.MAIN_HAND);
Minecraft.player.setSprinting(false);
new Thread(() -> {
try {
Thread.sleep(50L);
} catch (InterruptedException ignored) {
}
mc.execute(() -> {
if (Minecraft.player != null) {
Minecraft.player.setSprinting(true);
}
});
}).start();
return;
}
if (this.sprintMode.is("Legit")) {
if (wasSprinting && !Minecraft.player.isOnGround() && !Minecraft.player.areEyesInFluid(net.minecraft.tags.FluidTags.WATER) && Minecraft.player.getMotion().y <= 0.0030162615090425808) {
this.sprintResetTicks = 1;
Minecraft.player.setSprinting(false);
mc.playerController.attackEntity(Minecraft.player, this.target);
Minecraft.player.swingArm(Hand.MAIN_HAND);
Minecraft.player.setSprinting(true);
return;
}
}
if ((Boolean)this.alicebypass.getValue()) {
if (wasSprinting) {
this.isResettingSprint = true;
Minecraft.player.setSprinting(false);
}
if (Niva.getInst().getModuleManager().getCriticals().isEnabled() && Criticals.canUseCriticals()) {
Niva.getInst().getModuleManager().getCriticals().sendCrit();
}
mc.playerController.attackEntity(Minecraft.player, this.target);
Minecraft.player.swingArm(Hand.MAIN_HAND);
if (this.sprintMode.is("Grim Old")) {
Minecraft.player.connection.sendPacket(new CEntityActionPacket(Minecraft.player, CEntityActionPacket.Action.START_SPRINTING));
}
if (wasSprinting) {
(new Thread(() -> {
try {
Thread.sleep(50L);
this.isResettingSprint = false;
Minecraft.player.setSprinting(true);
} catch (InterruptedException var2) {
}
})).start();
}
} else {
if (Niva.getInst().getModuleManager().getCriticals().isEnabled() && Criticals.canUseCriticals()) {
Niva.getInst().getModuleManager().getCriticals().sendCrit();
}
mc.playerController.attackEntity(Minecraft.player, this.target);
Minecraft.player.swingArm(Hand.MAIN_HAND);
if (this.sprintMode.is("Grim Old")) {
Minecraft.player.connection.sendPacket(new CEntityActionPacket(Minecraft.player, CEntityActionPacket.Action.START_SPRINTING));
}
}
Criticals.cancelCrit = false;
}
PlayerController:
public void attackEntity(PlayerEntity playerIn, Entity targetEntity) {
event.entity = targetEntity;
Niva.getInst().getEventBus().post(event);
this.syncCurrentPlayItem();
AttackAura AttackAura = Niva.getInst().getModuleManager().getAttackAura();
String sprintMode = AttackAura != null && AttackAura.isEnabled() ? AttackAura.sprintMode.getValue() : "Vanilla";
boolean wasSprinting = mc.player.isSprinting();
boolean needRestoreSprint = false;
if (sprintMode.equals("Grim Old") && wasSprinting) {
mc.player.setSprinting(false);
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
needRestoreSprint = true;
}
if (sprintMode.equals("Grim New") && wasSprinting) {
mc.player.setSprinting(false);
}
if (sprintMode.equals("Legit") && wasSprinting) {
mc.player.setSprinting(false);
needRestoreSprint = true;
}
this.connection.sendPacket(new CUseEntityPacket(targetEntity, playerIn.isSneaking()));
if (this.currentGameType != GameType.SPECTATOR) {
playerIn.attackTargetEntityWithCurrentItem(targetEntity);
playerIn.resetCooldown();
}
if (sprintMode.equals("Grim Old") && needRestoreSprint) {
mc.player.setSprinting(true);
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
}
if (sprintMode.equals("Legit") && needRestoreSprint) {
mc.player.setSprinting(true);
}
if (sprintMode.equals("Grim New") && wasSprinting) {
new Thread(() -> {
try {
Thread.sleep(50);
} catch (InterruptedException ignored) {
}
mc.execute(() -> {
if (mc.player != null) {
mc.player.setSprinting(true);
}
});
}).start();
}
}