This commit is contained in:
bluepanee
2023-06-20 21:08:47 +05:00
committed by GitHub
parent b5a8fb0493
commit 9760dc2968
14 changed files with 68 additions and 64 deletions

View File

@@ -301,7 +301,7 @@ public class AutoWither extends Module {
for (int z = blockPos.getZ() - widthZ; z <= blockPos.getZ(); z++) {
for (int y = blockPos.getY(); y <= blockPos.getY() + 2; y++) {
bp.set(x, y, z);
if (!mc.world.getBlockState(bp).getMaterial().isReplaceable()) return false;
if (!mc.world.getBlockState(bp).isReplaceable()) return false;
if (!mc.world.canPlace(Blocks.STONE.getDefaultState(), bp, ShapeContext.absent())) return false;
}
}

View File

@@ -155,7 +155,7 @@ public class Confuse extends Module {
case Switch:
Vec3d diff = entityPos.subtract(playerPos);
Vec3d diff1 = new Vec3d(Utils.clamp(diff.x, -halfRange, halfRange), Utils.clamp(diff.y, -halfRange, halfRange), Utils.clamp(diff.z, -halfRange, halfRange));
Vec3d diff1 = new Vec3d(Math.max(-halfRange, Math.min(halfRange, diff.x)), Math.max(-halfRange, Math.min(halfRange, diff.y)), Math.max(-halfRange, Math.min(halfRange, diff.z)));
Vec3d goal2 = entityPos.add(diff1);
hit = mc.world.raycast(new RaycastContext(mc.player.getPos(), goal2, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInsideBlock()) {

View File

@@ -121,12 +121,12 @@ public class Painter extends Module {
private boolean shouldPlace(BlockPos blockPos, Block useBlock) {
// Self
if (!mc.world.getBlockState(blockPos).getMaterial().isReplaceable()) return false;
if (!mc.world.getBlockState(blockPos).isReplaceable()) return false;
// One block height
if (!oneBlockHeight.get() &&
!mc.world.getBlockState(blockPos.up()).getMaterial().isReplaceable() &&
!mc.world.getBlockState(blockPos.down()).getMaterial().isReplaceable()) return false;
!mc.world.getBlockState(blockPos.up()).isReplaceable() &&
!mc.world.getBlockState(blockPos.down()).isReplaceable()) return false;
boolean north = true;
@@ -144,21 +144,21 @@ public class Painter extends Module {
// Top surface
if (topSurfaces.get()) {
if (upState.getMaterial().isReplaceable() || upState.getBlock() == useBlock) up = false;
if (upState.isReplaceable() || upState.getBlock() == useBlock) up = false;
}
// Side surfaces
if (sideSurfaces.get()) {
if (northState.getMaterial().isReplaceable() || northState.getBlock() == useBlock) north = false;
if (southState.getMaterial().isReplaceable() || southState.getBlock() == useBlock) south = false;
if (eastState.getMaterial().isReplaceable() || eastState.getBlock() == useBlock) east = false;
if (westState.getMaterial().isReplaceable() || westState.getBlock() == useBlock) west = false;
if (northState.isReplaceable() || northState.getBlock() == useBlock) north = false;
if (southState.isReplaceable() || southState.getBlock() == useBlock) south = false;
if (eastState.isReplaceable() || eastState.getBlock() == useBlock) east = false;
if (westState.isReplaceable() || westState.getBlock() == useBlock) west = false;
}
// Bottom surface
if (bottomSurfaces.get()) {
if (bottomState.getMaterial().isReplaceable() || bottomState.getBlock() == useBlock) bottom = false;
if (bottomState.isReplaceable() || bottomState.getBlock() == useBlock) bottom = false;
}
return north || south || east || west || up || bottom;

View File

@@ -65,7 +65,7 @@ public class ShieldBypass extends Module {
Vec3d newPos = tp.add(e.getPos());
BlockPos pos = BlockPos.ofFloored(newPos);
for (int i = -2; i <= 2; i++) {
if (mc.player.world.getBlockState(pos.up(i)).isAir() && mc.player.world.getBlockState(pos).isAir()) {
if (mc.player.getWorld().getBlockState(pos.up(i)).isAir() && mc.player.getWorld().getBlockState(pos).isAir()) {
this.originalPos = originalPos;
if (rotate.get()) Rotations.rotate(-mc.player.getYaw(), mc.player.getPitch(), -10);
target = e;