Add Scaffold module with SafeWalk and Tower features
Some checks failed
continuous-integration/drone/push Build was killed

This commit is contained in:
2026-04-24 15:04:29 +06:00
parent 28776fa5b6
commit 54de787034
6 changed files with 149 additions and 1 deletions

View File

@@ -4,7 +4,10 @@
"Bash(curl -L -o gradle/wrapper/gradle-wrapper.jar https://raw.githubusercontent.com/gradle/gradle/master/gradle/wrapper/gradle-wrapper.jar)",
"Bash(git init *)",
"Bash(git checkout *)",
"Bash(git add *)"
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git remote *)",
"Bash(git push *)"
]
}
}

View File

@@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
import ru.nevetime.cheat.module.ModuleManager;
import ru.nevetime.cheat.module.combat.Killaura;
import ru.nevetime.cheat.module.combat.Triggerbot;
import ru.nevetime.cheat.module.movement.Scaffold;
import ru.nevetime.cheat.module.render.ESP;
import ru.nevetime.cheat.module.render.Hitbox;
import ru.nevetime.cheat.module.render.TargetHUD;
@@ -28,6 +29,7 @@ public class CheatClient implements ClientModInitializer {
moduleManager.register(new Killaura());
moduleManager.register(new Triggerbot());
moduleManager.register(new Scaffold());
moduleManager.register(new ESP());
moduleManager.register(new Hitbox());
moduleManager.register(new TargetHUD());

View File

@@ -0,0 +1,23 @@
package ru.nevetime.cheat.mixin;
import net.minecraft.client.network.ClientPlayerEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import ru.nevetime.cheat.CheatClient;
import ru.nevetime.cheat.module.movement.Scaffold;
@Mixin(ClientPlayerEntity.class)
public class ClientPlayerEntityMixin {
@Inject(method = "clipAtLedge", at = @At("HEAD"), cancellable = true)
private void onClipAtLedge(CallbackInfoReturnable<Boolean> cir) {
Scaffold scaffold = (Scaffold) CheatClient.getInstance()
.getModuleManager()
.getModule("Scaffold");
if (scaffold != null && scaffold.isSafeWalk()) {
cir.setReturnValue(true);
}
}
}

View File

@@ -0,0 +1,119 @@
package ru.nevetime.cheat.module.movement;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import ru.nevetime.cheat.module.Module;
public class Scaffold extends Module {
private int delay = 0;
private boolean tower = false;
private boolean safeWalk = true;
public Scaffold() {
super("Scaffold", Category.MOVEMENT);
}
@Override
public void onTick() {
if (mc.player == null || mc.world == null) return;
if (delay > 0) {
delay--;
return;
}
ItemStack heldItem = mc.player.getMainHandStack();
if (!(heldItem.getItem() instanceof BlockItem)) {
heldItem = mc.player.getOffHandStack();
if (!(heldItem.getItem() instanceof BlockItem)) {
return;
}
}
BlockPos playerPos = mc.player.getBlockPos();
BlockPos belowPos = playerPos.down();
if (mc.world.getBlockState(belowPos).getBlock() != Blocks.AIR) {
if (tower && mc.options.jumpKey.isPressed()) {
mc.player.setVelocity(mc.player.getVelocity().x, 0.42, mc.player.getVelocity().z);
}
return;
}
BlockPos placePos = findPlacePosition();
if (placePos == null) return;
Direction facing = Direction.UP;
Vec3d hitVec = new Vec3d(
placePos.getX() + 0.5,
placePos.getY() + 1.0,
placePos.getZ() + 0.5
);
BlockHitResult hitResult = new BlockHitResult(
hitVec,
facing,
placePos,
false
);
float prevPitch = mc.player.getPitch();
float prevYaw = mc.player.getYaw();
mc.player.setPitch(80.0f);
Hand hand = heldItem == mc.player.getMainHandStack() ? Hand.MAIN_HAND : Hand.OFF_HAND;
mc.interactionManager.interactBlock(mc.player, hand, hitResult);
mc.player.setPitch(prevPitch);
mc.player.setYaw(prevYaw);
delay = 2;
}
private BlockPos findPlacePosition() {
BlockPos playerPos = mc.player.getBlockPos();
BlockPos[] positions = {
playerPos.down(),
playerPos.down().north(),
playerPos.down().south(),
playerPos.down().east(),
playerPos.down().west()
};
for (BlockPos pos : positions) {
if (mc.world.getBlockState(pos).getBlock() == Blocks.AIR) {
BlockPos below = pos.down();
if (mc.world.getBlockState(below).getBlock() != Blocks.AIR) {
return below;
}
}
}
return null;
}
public boolean isSafeWalk() {
return safeWalk && isEnabled();
}
public void setTower(boolean tower) {
this.tower = tower;
}
public boolean isTower() {
return tower;
}
public void setSafeWalk(boolean safeWalk) {
this.safeWalk = safeWalk;
}
}

View File

@@ -4,6 +4,7 @@
"package": "ru.nevetime.cheat.mixin",
"compatibilityLevel": "JAVA_21",
"client": [
"ClientPlayerEntityMixin",
"InGameHudMixin",
"EntityMixin"
],