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 7358ee9 commit 44aaec2
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 36 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.4+build.3
loader_version=0.15.3

# Mod Properties
mod_version=1.2.4-1.20.4
mod_version=1.2.5-1.20.4
maven_group=pwn.noobs
archives_base_name=4trouser-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 @@ -60,6 +60,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();
}
}
9 changes: 1 addition & 8 deletions src/main/java/pwn/noobs/trouserstreak/modules/NbtEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ else if (mc.player.getMainHandStack().isEmpty()) {
item = new ItemStack(itemlist.get());
}

NbtList enchantments = new NbtList(); // Add enchantments to items
NbtList enchantments = new NbtList();
NbtCompound itemNbt = item.getNbt();
if (itemNbt != null) {
NbtList itemEnchantments = itemNbt.getList("Enchantments", 10);
Expand Down Expand Up @@ -412,35 +412,28 @@ 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 NBT data of the main hand item stack
NbtCompound mainHandNbt = mainHandStack.getNbt();

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);
}
}

// Copy the NBT data from the main hand to the off-hand
offHandStack.setNbt(mainHandNbt);

// Apply the changes to the offhand item stack
mc.interactionManager.clickCreativeStack(offHandStack, 45); // 45 is the offhand slot
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class OnlinePlayerActivityDetector extends Module {
Blocks.RAW_IRON_BLOCK, Blocks.BUDDING_AMETHYST, Blocks.SMALL_AMETHYST_BUD, Blocks.MEDIUM_AMETHYST_BUD, Blocks.LARGE_AMETHYST_BUD,
Blocks.WAXED_WEATHERED_COPPER_BULB, Blocks.WAXED_OXIDIZED_COPPER_BULB, Blocks.WAXED_COPPER_BLOCK,
Blocks.COBWEB, Blocks.OAK_FENCE, Blocks.DARK_OAK_FENCE, Blocks.RAIL, Blocks.SCULK_VEIN, Blocks.SCULK_SENSOR,
Blocks.ACACIA_LEAVES, Blocks.BIRCH_LEAVES, Blocks.OAK_LEAVES, Blocks.SPRUCE_LEAVES, Blocks.DARK_OAK_LEAVES, Blocks.CHERRY_LEAVES, Blocks.JUNGLE_LEAVES,
Blocks.ACACIA_LEAVES, Blocks.BIRCH_LEAVES, Blocks.OAK_LEAVES, Blocks.SPRUCE_LEAVES, Blocks.DARK_OAK_LEAVES, Blocks.CHERRY_LEAVES, Blocks.JUNGLE_LEAVES, Blocks.CACTUS,
Blocks.CAVE_VINES, Blocks.SUGAR_CANE, Blocks.TALL_GRASS, Blocks.SHORT_GRASS, Blocks.SEAGRASS, Blocks.TALL_SEAGRASS, Blocks.VINE, Blocks.FERN, Blocks.LARGE_FERN, Blocks.KELP,
Blocks.MOSS_BLOCK, Blocks.BIG_DRIPLEAF, Blocks.BIG_DRIPLEAF_STEM, Blocks.GLOW_LICHEN,
Blocks.BROWN_MUSHROOM, Blocks.RED_MUSHROOM, Blocks.FIRE, Blocks.CAVE_AIR, Blocks.BARRIER, Blocks.AIR, Blocks.WATER, Blocks.LAVA, Blocks.BUBBLE_COLUMN
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "streak-addon",
"version": "1.2.4",
"version": "1.2.5",
"name": "TrouserStreak",
"description": "Trouser-Streak is a compilation of modules, updated to the latest version and optimized for maximum grief. I did not make all of these.",
"authors": [
Expand Down

0 comments on commit 44aaec2

Please sign in to comment.