Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Обход античита Spider SpookyTime / Night 1.21.11

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
20 Фев 2026
Сообщения
9
Реакции
0
Выберите загрузчик игры
  1. Fabric
работает на трезубце и воде
Пожалуйста, авторизуйтесь для просмотра ссылки.

говнокод имеется
package ru.night.module.impl.movement;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.UpdateSelectedSlotC2SPacket;
import net.minecraft.util.Hand;
import ru.night.Night;
import ru.night.event.EventInit;
import ru.night.event.impl.EventUpdate;
import ru.night.module.api.Category;
import ru.night.module.api.IModule;
import ru.night.module.api.Module;
import ru.night.module.api.setting.Setting;
import ru.night.module.api.setting.impl.ModeSetting;
import ru.night.module.api.setting.impl.SliderSetting;
import ru.night.module.impl.combat.KillAura;
import ru.night.module.impl.combat.auraProcess.rotationProcess.impl.FreeLookUtil;

@IModule(
name = "Spider",
description = "Карабкается по стенам с водой",
category = Category.Movement,
bind = -1
)
@Environment(EnvType.CLIENT)
public class Spider extends Module {
private static final double SOFT_LIFT = 0.36;
private static final double WATER_LIFT = 0.2;
private static final int BOOST_TICKS = 3;
private final ModeSetting mode = new ModeSetting("Режим", "Обычный", "Обычный", "Быстрый", "SpookytimeBETA");
private final SliderSetting spookyClimbSpeed = new SliderSetting("Скорость подъема", 0.34F, 0.1F, 0.6F, 0.01F, false).hidden(() -> !this.mode.is("SpookytimeBETA"));
private int prevSlot = -1;
private long lastUseTime = 0L;
private long lastGroundTime = System.currentTimeMillis();
private boolean isChargingTrident = false;
private long tridentChargeStart = 0L;
private boolean motionPaused = false;
private long pauseEndTime = 0L;
private double startY = Double.NaN;
private int blocksPassed = 0;
private long nextSpookyUseTime = 0L;
private int pendingBoostTicks = 0;

public Spider() {
this.addSettings(new Setting[]{this.mode, this.spookyClimbSpeed});
}

@EventInit
public void onUpdate(EventUpdate event) {
if (mc.player == null || mc.world == null || mc.interactionManager == null || mc.getNetworkHandler() == null) {
return;
}

if (this.mode.is("SpookytimeBETA")) {
this.handleSpookytime();
return;
}

this.handleNormalFast();
}

private void handleNormalFast() {
if (this.pendingBoostTicks > 0) {
this.pendingBoostTicks--;
mc.player.setVelocity(mc.player.getVelocity().x, SOFT_LIFT, mc.player.getVelocity().z);
}

int tridentSlot = this.findTrident();
int waterSlot = this.findWaterBucket();
if (tridentSlot != -1 && (this.mode.is("Обычный") || this.mode.is("Быстрый"))) {
this.selectHotbarSlot(tridentSlot);
mc.options.useKey.setPressed(true);
if (!mc.player.isUsingItem()) {
mc.player.setCurrentHand(Hand.MAIN_HAND);
}
} else {
mc.options.useKey.setPressed(false);
}

if (mc.player.isTouchingWater()) {
this.applyLift(WATER_LIFT);
return;
}

if (mc.player.isOnGround()) {
this.lastGroundTime = System.currentTimeMillis();
this.isChargingTrident = false;
if (mc.player.horizontalCollision && !mc.player.collidedSoftly) {
mc.player.jump();
}

return;
}

long airTime = System.currentTimeMillis() - this.lastGroundTime;
long minAirTime = this.mode.is("Быстрый") ? 30L : 50L;
if (airTime < minAirTime) {
return;
}

if (!mc.player.horizontalCollision || mc.player.collidedSoftly) {
mc.options.sneakKey.setPressed(false);
mc.options.jumpKey.setPressed(false);
this.isChargingTrident = false;
return;
}

waterSlot = this.findWaterBucket();
tridentSlot = this.findTrident();
boolean hasWater = waterSlot != -1;
boolean hasTrident = tridentSlot != -1;
boolean useCombo = hasWater && hasTrident && this.mode.is("Обычный");
if (!hasWater) {
return;
}

long now = System.currentTimeMillis();
if (now - this.lastUseTime < this.getCooldown()) {
return;
}

mc.options.jumpKey.setPressed(true);
mc.player.setPitch(60.0F);
this.prevSlot = mc.player.getInventory().getSelectedSlot();
if (useCombo) {
this.selectHotbarSlot(tridentSlot);
if (!this.isChargingTrident) {
this.isChargingTrident = true;
this.tridentChargeStart = now;
}

if (now - this.tridentChargeStart >= 20L) {
this.selectHotbarSlot(waterSlot);
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
this.selectHotbarSlot(tridentSlot);
mc.player.setVelocity(mc.player.getVelocity().x, SOFT_LIFT, mc.player.getVelocity().z);
this.pendingBoostTicks = BOOST_TICKS;
this.isChargingTrident = false;
}
} else {
this.selectHotbarSlot(waterSlot);
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
mc.player.setVelocity(mc.player.getVelocity().x, SOFT_LIFT, mc.player.getVelocity().z);
this.pendingBoostTicks = BOOST_TICKS;
}

if (this.prevSlot >= 0) {
this.selectHotbarSlot(this.prevSlot);
}

mc.options.sneakKey.setPressed(true);
this.lastUseTime = now;
}

private void handleSpookytime() {
long now = System.currentTimeMillis();
if (this.motionPaused) {
if (now < this.pauseEndTime) {
return;
}

this.motionPaused = false;
this.startY = mc.player.getY();
this.blocksPassed = 0;
}

if (Double.isNaN(this.startY)) {
this.startY = mc.player.getY();
}

if (Math.abs(mc.player.getY() - this.startY) >= this.blocksPassed + 1) {
this.blocksPassed++;
}

if (this.blocksPassed >= 3) {
this.motionPaused = true;
this.pauseEndTime = now + 500L;
return;
}

if (mc.player.isTouchingWater()) {
this.applyLift(Math.min(this.spookyClimbSpeed.get(), 0.42F));
return;
}

int waterSlot = this.findWaterBucket();
if (waterSlot == -1) {
return;
}

if (mc.player.horizontalCollision && !mc.player.collidedSoftly) {
if (mc.player.isOnGround()) {
mc.player.jump();
}

mc.options.jumpKey.setPressed(true);
if (now >= this.nextSpookyUseTime) {
int currentSlot = mc.player.getInventory().getSelectedSlot();
mc.player.setPitch(90.0F);
this.selectHotbarSlot(waterSlot);
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
this.selectHotbarSlot(currentSlot);
this.applyLift(Math.min(this.spookyClimbSpeed.get(), 0.42F));
this.nextSpookyUseTime = now + this.getSpookyDelayMs();
}

mc.options.sneakKey.setPressed(true);
} else {
mc.options.sneakKey.setPressed(false);
mc.options.jumpKey.setPressed(false);
}
}

private int findWaterBucket() {
for (int i = 0; i < 9; i++) {
ItemStack stack = mc.player.getInventory().getStack(i);
if (!stack.isEmpty() && stack.getItem() == Items.WATER_BUCKET) {
return i;
}
}

return -1;
}

private int findTrident() {
for (int i = 0; i < 9; i++) {
ItemStack stack = mc.player.getInventory().getStack(i);
if (!stack.isEmpty() && stack.getItem() == Items.TRIDENT) {
return i;
}
}

return -1;
}

private void selectHotbarSlot(int slot) {
if (slot < 0 || slot > 8) {
return;
}

if (mc.player.getInventory().getSelectedSlot() != slot) {
mc.player.getInventory().setSelectedSlot(slot);
mc.getNetworkHandler().sendPacket(new UpdateSelectedSlotC2SPacket(slot));
}
}

private long getSpookyDelayMs() {
float speed = this.spookyClimbSpeed.get();
long delay = (long)(1000.0 - (speed - 0.1F) / 0.9F * 800.0);
return Math.max(50L, delay);
}

private long getCooldown() {
return this.mode.is("Быстрый") ? 20L : 40L;
}

private void applyLift(double lift) {
double currentY = mc.player.getVelocity().y;
if (currentY < lift) {
mc.player.setVelocity(mc.player.getVelocity().x, lift, mc.player.getVelocity().z);
}
}

@Override
public void onEnable() {
super.onEnable();
mc.options.sneakKey.setPressed(true);
KillAura aura = Night.get != null && Night.get.manager != null ? Night.get.manager.get(KillAura.class) : null;
if (aura == null || !aura.enable) {
FreeLookUtil.active = true;
}

if (this.mode.is("Обычный") || this.mode.is("Быстрый")) {
int tridentSlot = this.findTrident();
if (tridentSlot != -1) {
this.selectHotbarSlot(tridentSlot);
mc.options.useKey.setPressed(true);
if (!mc.player.isUsingItem()) {
mc.player.setCurrentHand(Hand.MAIN_HAND);
}
}
}
}

@Override
public void onDisable() {
super.onDisable();
mc.options.sneakKey.setPressed(false);
mc.options.jumpKey.setPressed(false);
mc.options.useKey.setPressed(false);
KillAura aura = Night.get != null && Night.get.manager != null ? Night.get.manager.get(KillAura.class) : null;
if (aura == null || !aura.enable) {
FreeLookUtil.active = false;
}

this.prevSlot = -1;
this.lastUseTime = 0L;
this.isChargingTrident = false;
this.tridentChargeStart = 0L;
this.motionPaused = false;
this.pauseEndTime = 0L;
this.startY = Double.NaN;
this.blocksPassed = 0;
this.nextSpookyUseTime = 0L;
this.pendingBoostTicks = 0;
}
}
 
Назад
Сверху Снизу