Skip to content

Commit

Permalink
1.2.5 Added BoatKill exploit, make MaceKill work w/ flight
Browse files Browse the repository at this point in the history
**Added BoatKill Module**
- Enabling this while in a boat instakills it's passengers. Thank you to [filepile](https://github.com/not-filepile) for writing this! This has been patched in the latest 1.21.2 snapshots.
 
**Macekill module**
- Fixed MaceKill not working while flying with NoFall enabled.

**Chunk Tracing Updates**
- Fixed false positives of chunks showing up as Old Generation in the overworld with NewerNewChunks. That's rare now.
- Fixed lag when you have lots of chunk positions in memory and your character is dead in BaseFinder and NewerNewChunks
- Removed Exposed and Weathered Copper blocks from the default detection list for basefinder because they can occur naturally from copper oxidizing in trial chambers in Trouser for Minecraft 1.21+.
- Added the Weathered Copper to the default list #2 though so it can still be detected if there is alot of them in a chunk in Trouser for Minecraft 1.21+.
- Fixed the Delete data button not working for the nearest detected base chunk with BaseFinder.
- Removed pumpkin stem from the default un-natural blocks list in BaseFinder because it does actually spawn naturally in some villages.

**OnlinePlayerActivityDetector Update**
- Added Cactus to the default list of Overworld false positive blocks to prevent false positives in deserts.
  • Loading branch information
etianl authored Sep 15, 2024
1 parent f55083f commit 123b923
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 42 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ In no particular order
- **BetterAutoSign:** Automatically writes signs with the text you specify, and can also apply glow ink or dye. Includes a "Sign Aura" option which rewrites all the signs around to the text of your choosing. Credits to Meteor-Tweaks for BetterAutoSign, and to [stever9487](https://github.com/stever9487) for the Sign Aura based off of Meteor Rejects' Chest Aura
- **BetterScaffold:** Give you more options for scaffolding, bigger range and others. (Credits to Meteor-Tweaks)
- **BlockListMineCommand:** Adds a custom #mine command to your message history containing all the blocks in the custom blocklist that are near you. Press T then up arrow, then ENTER key to execute the command. BETTER CHAT module is recommended for infinitely long commands. (Credits to etianl :D)
- **BoatKill:** Kills all players in a boat using funny packets. Is patched in Minecraft 1.21.2. Credits to [filepile](https://github.com/not-filepile) for writing this!
- **Book And Quill Dupe:** Overflows data in a book's title to cause dupes and chunk bans. Credits to [Thorioum](https://github.com/Thorioum)!
- **Boom+:** Throws entities or spawns them on the targeted block when you click (Credits to Allah-Hack for the original) I just added more fun things you might want to throw as well as included the option for height based on player Y level.
- **BungeeSpoofer:** Allows you to join servers with an exposed bungeecord backend. (Credits to DAMcraft of ServerSeeker!)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn_mappings=1.20.6+build.1
loader_version=0.15.10

# Mod Properties
mod_version=1.2.4-1.20.6
mod_version=1.2.5-1.20.6
maven_group=pwn.noobs
archives_base_name=3trouser-streak

Expand Down
1 change: 1 addition & 0 deletions src/main/java/pwn/noobs/trouserstreak/Trouser.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public void onInitialize() {
//Modules.get().add(new -----> Exploits for old versions! <-----());
Modules.get().add(new ShulkerDupe());
Modules.get().add(new InvDupeModule());
Modules.get().add(new BoatKill());
Modules.get().add(new InstantKill());
Modules.get().add(new LecternCrash());

Expand Down
31 changes: 15 additions & 16 deletions src/main/java/pwn/noobs/trouserstreak/modules/BaseFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private Set<EntityType<?>> getDefaultCreatures() {
.description("If the total amount of any of these found is greater than the Number specified, throw a base location.")
.defaultValue(
Blocks.BLACK_BED, Blocks.BROWN_BED, Blocks.GRAY_BED, Blocks.LIGHT_BLUE_BED, Blocks.LIGHT_GRAY_BED, Blocks.MAGENTA_BED, Blocks.PINK_BED,
Blocks.SPRUCE_SAPLING, Blocks.OAK_SAPLING, Blocks.BIRCH_SAPLING, Blocks.JUNGLE_SAPLING, Blocks.CHERRY_SAPLING, Blocks.BAMBOO_SAPLING, Blocks.PUMPKIN_STEM, Blocks.ATTACHED_PUMPKIN_STEM,
Blocks.SPRUCE_SAPLING, Blocks.OAK_SAPLING, Blocks.BIRCH_SAPLING, Blocks.JUNGLE_SAPLING, Blocks.CHERRY_SAPLING, Blocks.BAMBOO_SAPLING,
Blocks.CHERRY_BUTTON, Blocks.CHERRY_DOOR, Blocks.CHERRY_FENCE, Blocks.CHERRY_FENCE_GATE, Blocks.CHERRY_PLANKS, Blocks.CHERRY_PRESSURE_PLATE, Blocks.CHERRY_STAIRS, Blocks.CHERRY_WOOD, Blocks.CHERRY_TRAPDOOR, Blocks.CHERRY_SLAB,
Blocks.MANGROVE_PLANKS, Blocks.MANGROVE_BUTTON, Blocks.MANGROVE_DOOR, Blocks.MANGROVE_FENCE, Blocks.MANGROVE_FENCE_GATE, Blocks.MANGROVE_STAIRS, Blocks.MANGROVE_SLAB, Blocks.MANGROVE_TRAPDOOR,
Blocks.BIRCH_DOOR, Blocks.BIRCH_FENCE_GATE, Blocks.BIRCH_BUTTON, Blocks.OAK_BUTTON, Blocks.ACACIA_BUTTON, Blocks.DARK_OAK_BUTTON, Blocks.POLISHED_BLACKSTONE_BUTTON, Blocks.SPRUCE_BUTTON,
Expand Down Expand Up @@ -597,13 +597,20 @@ public WWidget getWidget(GuiTheme theme) {
public BaseFinder() {
super(Trouser.Main,"BaseFinder", "Estimates if a build or base may be in the chunk based on the blocks it contains.");
}
private void clearChunkData() {
baseChunks.clear();
closestbaseX=2000000000;
closestbaseZ=2000000000;
basedistance=2000000000;
LastBaseFound= new ChunkPos(2000000000, 2000000000);
}
@Override
public void onActivate() {
isBaseFinderModuleOn=1;
if (save.get())saveDataWasOn = true;
else if (!save.get())saveDataWasOn = false;
if (autoreload.get()) {
baseChunks.clear();
clearChunkData();
}
if (save.get() || load.get()) {
if (mc.isInSingleplayer()==true){
Expand Down Expand Up @@ -638,19 +645,15 @@ public void onDeactivate() {
worldchange=false;
justenabledsavedata = 0;
if (remove.get()|autoreload.get()) {
baseChunks.clear();
closestbaseX=2000000000;
closestbaseZ=2000000000;
basedistance=2000000000;
LastBaseFound= new ChunkPos(2000000000, 2000000000);
clearChunkData();
}
super.onDeactivate();
}
@EventHandler
private void onScreenOpen(OpenScreenEvent event) {
if (event.screen instanceof DisconnectedScreen) {
if (worldleaveremove.get()) {
baseChunks.clear();
clearChunkData();
}
}
if (event.screen instanceof DownloadingTerrainScreen) {
Expand All @@ -660,11 +663,7 @@ private void onScreenOpen(OpenScreenEvent event) {
@EventHandler
private void onGameLeft(GameLeftEvent event) {
if (worldleaveremove.get()) {
baseChunks.clear();
closestbaseX=2000000000;
closestbaseZ=2000000000;
basedistance=2000000000;
LastBaseFound= new ChunkPos(2000000000, 2000000000);
clearChunkData();
}
}
@EventHandler
Expand All @@ -687,7 +686,7 @@ else if (basefoundspamTicks >= bsefndtickdelay.get()) {
} else {
serverip = mc.getCurrentServerEntry().address.replace(':', '_');
}
baseChunks.clear();
clearChunkData();
try {
Files.deleteIfExists(Paths.get("TrouserStreak", "BaseChunks", serverip, world, "BaseChunkData.txt"));
} catch (IOException e) {
Expand Down Expand Up @@ -742,7 +741,7 @@ else if (basefoundspamTicks >= bsefndtickdelay.get()) {
if (autoreload.get()) {
autoreloadticks++;
if (autoreloadticks == removedelay.get() * 20) {
baseChunks.clear();
clearChunkData();
if (load.get()) {
loadData();
}
Expand All @@ -753,7 +752,7 @@ else if (basefoundspamTicks >= bsefndtickdelay.get()) {
//autoreload when entering different dimensions
if (load.get() && worldchange == true) {
if (worldleaveremove.get()) {
baseChunks.clear();
clearChunkData();
}
loadData();
worldchange = false;
Expand Down
66 changes: 66 additions & 0 deletions src/main/java/pwn/noobs/trouserstreak/modules/BoatKill.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package pwn.noobs.trouserstreak.modules;

import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import net.minecraft.text.Text;
import net.minecraft.util.math.Vec3d;
import pwn.noobs.trouserstreak.Trouser;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class BoatKill extends Module {

public BoatKill() {
super(Trouser.Main, "BoatKill", "Kill everyone in a boat using funny packets.");
}

private final SettingGroup repeatGroup = settings.createGroup("Repeat");
private final SettingGroup delayGroup = settings.createGroup("Delay");
private final Setting<Integer> repeat = repeatGroup.add(new IntSetting.Builder()
.name("Repeat")
.description("Number of times to repeat the action")
.defaultValue(20)
.min(1)
.sliderRange(1,100)
.build()
);
private final Setting<Integer> delay = delayGroup.add(new IntSetting.Builder()
.name("Delay")
.description("Delay between each action in seconds")
.defaultValue(0)
.min(0)
.sliderRange(0,100)
.build()
);

private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);

@Override
public void onActivate() {
if (!(mc.player.getVehicle() instanceof BoatEntity boat)) {
ChatUtils.sendMsg(Text.of("you must be on the boat."));
toggle();
return;
}
Vec3d originalPos = boat.getPos();
boat.setPosition(originalPos.add(0, 0.05, 0));
VehicleMoveC2SPacket groundPacket = new VehicleMoveC2SPacket(boat);
boat.setPosition(originalPos.add(0, 20, 0));
VehicleMoveC2SPacket skyPacket = new VehicleMoveC2SPacket(boat);
boat.setPosition(originalPos);
for (int i = 0; i < repeat.get(); i++) { // 디폴트값:20
scheduler.schedule(() -> mc.player.networkHandler.sendPacket(skyPacket), delay.get(), TimeUnit.SECONDS);
scheduler.schedule(() -> mc.player.networkHandler.sendPacket(groundPacket), delay.get(), TimeUnit.SECONDS);
}
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(boat));
ChatUtils.sendMsg(Text.of("exploit executed successfully."));
toggle();
}
}
20 changes: 15 additions & 5 deletions src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixininterface.IPlayerInteractEntityC2SPacket;
import meteordevelopment.meteorclient.mixininterface.IPlayerMoveC2SPacket;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
Expand Down Expand Up @@ -80,11 +81,15 @@ private void onSendPacket(PacketEvent.Send event) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
} else {
for (int i = 0; i < 4; i++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(false));
}
double maxHeight = Math.min(mc.player.getY() + 22, mc.player.getY() + blocks);
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), maxHeight, mc.player.getZ(), false));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false));
PlayerMoveC2SPacket movepacket = new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), maxHeight, mc.player.getZ(), false);
PlayerMoveC2SPacket homepacket = new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false);
((IPlayerMoveC2SPacket) homepacket).setTag(1337);
((IPlayerMoveC2SPacket) movepacket).setTag(1337);
mc.player.networkHandler.sendPacket(movepacket);
mc.player.networkHandler.sendPacket(homepacket);
}
return;
}
Expand All @@ -100,6 +105,9 @@ private void onSendPacket(PacketEvent.Send event) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(false));
}
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + blocks, mc.player.getZ(), false));
PlayerMoveC2SPacket movepacket = new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + blocks, mc.player.getZ(), false);
((IPlayerMoveC2SPacket) movepacket).setTag(1337);
mc.player.networkHandler.sendPacket(movepacket);
}

// Move back to original position
Expand All @@ -110,9 +118,11 @@ private void onSendPacket(PacketEvent.Send event) {
mc.player.getVehicle().setPosition(previouspos);
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
} else {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false));
PlayerMoveC2SPacket homepacket = new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false);
((IPlayerMoveC2SPacket) homepacket).setTag(1337);
mc.player.networkHandler.sendPacket(homepacket);
// Do it again to be sure it happens
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false));
mc.player.networkHandler.sendPacket(homepacket);
}
}
}
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/pwn/noobs/trouserstreak/modules/NbtEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class NbtEditor extends Module {
.defaultValue("wither")
.visible(() -> mode.get() == Modes.Entity)
.build());
//Item mode doesn't work
private final Setting<Item> itemlist = sgOptions.add(new ItemSetting.Builder()
.name("Item to create.")
.description("Pick one. If you aren't already holding an item this is what you get.")
Expand Down Expand Up @@ -242,7 +241,6 @@ public class NbtEditor extends Module {
.sliderRange(0, 255)
.visible(() -> mode.get() == Modes.Potion)
.build());
//Item mode doesn't work
private final Setting<List<Enchantment>> enchants = sgOptions.add(new EnchantmentListSetting.Builder()
.name("Enchants")
.description("List of enchantments.")
Expand Down Expand Up @@ -338,25 +336,20 @@ else switch (potionmode.get()) {
}
}
case Copy -> {
// Get the item stack from the main hand
ItemStack mainHandStack = mc.player.getMainHandStack();

// If the main hand is empty, use a new item stack
if (mainHandStack.isEmpty()) {
error("Put an item in your main hand.");
return;
}

// Get the components from the main hand item stack
ComponentMap mainHandComponents = mainHandStack.getComponents();
ItemStack offHandStack = mc.player.getOffHandStack();

if (copyStack.get()){
// Get the item stack from the offhand
offHandStack = mainHandStack;
}
else if (!copyStack.get()){
// If the offhand is empty, use a new item stack
if (offHandStack.isEmpty()) {
offHandStack = new ItemStack(Items.CARROT_ON_A_STICK);
}
Expand Down Expand Up @@ -412,8 +405,7 @@ private NbtComponent createEntityData() {
return NbtComponent.of(entityTag);
}
public enum Modes {
//Entity, Potion, Copy
Entity, Item, Potion, Copy //Item mode doesn't work
Entity, Item, Potion, Copy
}
public enum pModes {
Normal, Splash, Lingering
Expand Down
26 changes: 17 additions & 9 deletions src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,18 @@ public WWidget getWidget(GuiTheme theme) {
ORE_BLOCKS.add(Blocks.EMERALD_ORE);
ORE_BLOCKS.add(Blocks.DEEPSLATE_EMERALD_ORE);
}
private static final Set<Block> DEEPSLATE_BLOCKS = new HashSet<>();
static {
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_COPPER_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_IRON_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_COAL_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_REDSTONE_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_EMERALD_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_GOLD_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_LAPIS_ORE);
DEEPSLATE_BLOCKS.add(Blocks.DEEPSLATE_DIAMOND_ORE);
}
private static final Set<Block> NEW_OVERWORLD_BLOCKS = new HashSet<>();
static {
NEW_OVERWORLD_BLOCKS.add(Blocks.DEEPSLATE);
Expand Down Expand Up @@ -476,10 +488,6 @@ private void onGameLeft(GameLeftEvent event) {
private void onPreTick(TickEvent.Pre event) {
world= mc.world.getRegistryKey().getValue().toString().replace(':', '_');

if (mc.player.getHealth()==0) {
resetCounterValues();
worldchange=true;
}
if (deletewarningTicks<=100) deletewarningTicks++;
else deletewarning=0;
if (deletewarning>=2){
Expand Down Expand Up @@ -761,15 +769,15 @@ else if (!(event.packet instanceof AcknowledgeChunksC2SPacket) && !(event.packet
boolean isNewNetherGeneration = false;
ChunkSection[] sections = chunk.getSectionArray();

if (overworldOldChunksDetector.get() && mc.world.getRegistryKey() == World.OVERWORLD) {
if (overworldOldChunksDetector.get() && mc.world.getRegistryKey() == World.OVERWORLD && chunk.getStatus().isAtLeast(ChunkStatus.FULL) && !chunk.isEmpty()) {
for (int i = 0; i < 17; i++) {
ChunkSection section = sections[i];
if (section != null && !section.isEmpty() && i > 4) {
if (section != null && !section.isEmpty()) {
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
for (int z = 0; z < 16; z++) {
if (!foundAnyOre && ORE_BLOCKS.contains(section.getBlockState(x, y, z).getBlock())) foundAnyOre = true; //prevent false flags in flat world
if (!isNewOverworldGeneration && NEW_OVERWORLD_BLOCKS.contains(section.getBlockState(x, y, z).getBlock())) {
if (((y >= 5 && i == 4) || i > 4) && !isNewOverworldGeneration && (NEW_OVERWORLD_BLOCKS.contains(section.getBlockState(x, y, z).getBlock()) || DEEPSLATE_BLOCKS.contains(section.getBlockState(x, y, z).getBlock()))) {
isNewOverworldGeneration = true;
break;
}
Expand All @@ -781,7 +789,7 @@ else if (!(event.packet instanceof AcknowledgeChunksC2SPacket) && !(event.packet
if (foundAnyOre && !isOldGeneration && !isNewOverworldGeneration) isOldGeneration = true;
}

if (netherOldChunksDetector.get() && mc.world.getRegistryKey() == World.NETHER) {
if (netherOldChunksDetector.get() && mc.world.getRegistryKey() == World.NETHER && chunk.getStatus().isAtLeast(ChunkStatus.FULL) && !chunk.isEmpty()) {
for (int i = 0; i < 8; i++) {
ChunkSection section = sections[i];
if (section != null && !section.isEmpty()) {
Expand All @@ -800,7 +808,7 @@ else if (!(event.packet instanceof AcknowledgeChunksC2SPacket) && !(event.packet
if (!isOldGeneration && !isNewNetherGeneration) isOldGeneration = true;
}

if (endOldChunksDetector.get() && mc.world.getRegistryKey() == World.END) {
if (endOldChunksDetector.get() && mc.world.getRegistryKey() == World.END && chunk.getStatus().isAtLeast(ChunkStatus.FULL) && !chunk.isEmpty()) {
ChunkSection section = chunk.getSection(0);
var biomesContainer = section.getBiomeContainer();
if (biomesContainer instanceof PalettedContainer<RegistryEntry<Biome>> biomesPaletteContainer) {
Expand Down
Loading

0 comments on commit 123b923

Please sign in to comment.