-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from agreed31579/main
Added ".AutoVaultClip" command. Like .autovclip, but uses the "Vault Clip" bypass.
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.9
- v1.3.9-1.21.4
- v1.3.9-1.21.4-newFormat
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.9
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.9.9
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.9
- v0.8.8
- v0.8.7
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
Showing
3 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
src/main/java/pwn/noobs/trouserstreak/commands/AutoVaultClipCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package pwn.noobs.trouserstreak.commands; | ||
|
||
import com.mojang.brigadier.builder.LiteralArgumentBuilder; | ||
import meteordevelopment.meteorclient.commands.Command; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.client.network.ClientPlayerEntity; | ||
import net.minecraft.command.CommandSource; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; | ||
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket; | ||
|
||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS; | ||
import static meteordevelopment.meteorclient.MeteorClient.mc; | ||
|
||
public class AutoVaultClipCommand extends Command { | ||
public AutoVaultClipCommand() { | ||
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) { | ||
builder.executes(ctx -> { | ||
error("Choose Up, Down or Highest"); | ||
return SINGLE_SUCCESS; | ||
}); | ||
builder.then(literal("up").executes(ctx -> { | ||
ClientPlayerEntity player = mc.player; | ||
assert player != null; | ||
for (int i = 0; i < 199; i++) { | ||
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; | ||
if (player.hasVehicle()) { | ||
Entity vehicle = 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)); | ||
} | ||
player.setPosition(player.getX(), isopenair1.getY(), player.getZ()); | ||
return SINGLE_SUCCESS; | ||
} | ||
} | ||
error("No gap found to vclip into"); | ||
return SINGLE_SUCCESS; | ||
})); | ||
builder.then(literal("down").executes(ctx -> { | ||
ClientPlayerEntity player = mc.player; | ||
assert player != null; | ||
for (int i = 0; i > -199; i--) { | ||
BlockPos isopenair1 = (player.getBlockPos().add(0,i,0)); | ||
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()) { | ||
Entity vehicle = 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)); | ||
} | ||
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; | ||
|
||
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())); | ||
} | ||
|
||
vehicle.setPosition(vehicle.getX(), newopenair2.getY(), vehicle.getZ()); | ||
} | ||
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; | ||
})); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,4 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) { | |
return SINGLE_SUCCESS; | ||
})); | ||
} | ||
} | ||
} |