Skip to content

Commit

Permalink
changed AutoVaultClip description slightly, removed an unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
etianl authored Feb 3, 2024
1 parent 2d38094 commit 24d99e0
Showing 1 changed file with 33 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package pwn.noobs.trouserstreak.commands;

import com.mojang.brigadier.arguments.DoubleArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.block.Blocks;
Expand All @@ -16,7 +15,7 @@

public class AutoVaultClipCommand extends Command {
public AutoVaultClipCommand() {
super("autovaultclip", "Lets you clip through blocks vertically automatically, with vault clip bypass implemented. Paper only!");
super("autovaultclip", "Lets you clip through blocks vertically automatically, with vault clip bypass implemented. Works on Paper, Spigot, but not always on Vanilla.");
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
Expand All @@ -31,22 +30,22 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
BlockPos isopenair1 = (player.getBlockPos().add(0,i+2,0));
BlockPos isopenair2 = (player.getBlockPos().add(0,i+3,0));
if (mc.world.getBlockState(isopenair1).isReplaceable() && mc.world.getFluidState(isopenair1).isEmpty() && !mc.world.getBlockState(isopenair1).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isopenair2).isReplaceable() && mc.world.getFluidState(isopenair2).isEmpty() && !mc.world.getBlockState(isopenair2).isOf(Blocks.POWDER_SNOW)){
int packetsRequired = 20;
int packetsRequired = 20;
if (player.hasVehicle()) {
Entity vehicle = player.getVehicle();
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}
vehicle.setPosition(vehicle.getX(), isopenair1.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
player.setPosition(player.getX(), isopenair1.getY(), player.getZ());
return SINGLE_SUCCESS;
}
}
error("No gap found to vclip into");
error("No gap found to vclip into");
return SINGLE_SUCCESS;
}));
builder.then(literal("down").executes(ctx -> {
Expand All @@ -57,49 +56,49 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
BlockPos isopenair2 = (player.getBlockPos().add(0,i-1,0));
if (mc.world.getBlockState(isopenair1).isReplaceable() && mc.world.getFluidState(isopenair1).isEmpty() && !mc.world.getBlockState(isopenair1).isOf(Blocks.POWDER_SNOW) && mc.world.getBlockState(isopenair2).isReplaceable() && mc.world.getFluidState(isopenair2).isEmpty() && !mc.world.getBlockState(isopenair2).isOf(Blocks.POWDER_SNOW)){
int packetsRequired = 20;
if (player.hasVehicle()) {
if (player.hasVehicle()) {
Entity vehicle = player.getVehicle();
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}
vehicle.setPosition(vehicle.getX(), isopenair2.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
player.setPosition(player.getX(), isopenair2.getY(), player.getZ());
return SINGLE_SUCCESS;
}
}
error("No gap found to vclip into");
return SINGLE_SUCCESS;
}));
builder.then(literal("highest").executes(ctx -> {
ClientPlayerEntity player = mc.player;
assert player != null;
builder.then(literal("highest").executes(ctx -> {
ClientPlayerEntity player = mc.player;
assert player != null;

for (int i = 199; i > 0; i--) {
BlockPos isopenair1 = (player.getBlockPos().add(0,i,0));
BlockPos newopenair2 = isopenair1.up(1);
if (!mc.world.getBlockState(isopenair1).isReplaceable() && !mc.world.getBlockState(isopenair1).isOf(Blocks.POWDER_SNOW) && mc.world.getFluidState(isopenair1).isEmpty()) {
int packetsRequired = 20;
if (player.hasVehicle()) {
for (int i = 199; i > 0; i--) {
BlockPos isopenair1 = (player.getBlockPos().add(0,i,0));
BlockPos newopenair2 = isopenair1.up(1);
if (!mc.world.getBlockState(isopenair1).isReplaceable() && !mc.world.getBlockState(isopenair1).isOf(Blocks.POWDER_SNOW) && mc.world.getFluidState(isopenair1).isEmpty()) {
int packetsRequired = 20;
if (player.hasVehicle()) {
Entity vehicle = player.getVehicle();
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}

vehicle.setPosition(vehicle.getX(), newopenair2.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
player.setPosition(player.getX(), newopenair2.getY(), player.getZ());
return SINGLE_SUCCESS;
}
}
error("No blocks above you found!");
return SINGLE_SUCCESS;
}));
}
}));
}
}

0 comments on commit 24d99e0

Please sign in to comment.