From 64dd2bc3340093ae7ccc815453a06cce3b87d676 Mon Sep 17 00:00:00 2001 From: etianl <115842502+etianl@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:47:59 -0700 Subject: [PATCH] 1.2.5 Added BoatKill exploit, make MaceKill work w/ flight **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. --- README.md | 1 + gradle.properties | 2 +- .../java/pwn/noobs/trouserstreak/Trouser.java | 1 + .../trouserstreak/modules/BaseFinder.java | 35 +++++----- .../noobs/trouserstreak/modules/BoatKill.java | 67 +++++++++++++++++++ .../noobs/trouserstreak/modules/MaceKill.java | 20 ++++-- .../trouserstreak/modules/NbtEditor.java | 15 +---- .../trouserstreak/modules/NewerNewChunks.java | 26 ++++--- .../modules/OnlinePlayerActivityDetector.java | 2 +- src/main/resources/fabric.mod.json | 2 +- 10 files changed, 123 insertions(+), 48 deletions(-) create mode 100644 src/main/java/pwn/noobs/trouserstreak/modules/BoatKill.java diff --git a/README.md b/README.md index 90ab2c8d..14b5c40e 100644 --- a/README.md +++ b/README.md @@ -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!) diff --git a/gradle.properties b/gradle.properties index 5dc7b33f..79f26bd0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ yarn_mappings=1.21+build.9 loader_version=0.15.11 # Mod Properties -mod_version=1.2.4-1.21 +mod_version=1.2.5-1.21 maven_group=pwn.noobs archives_base_name=2trouser-streak diff --git a/src/main/java/pwn/noobs/trouserstreak/Trouser.java b/src/main/java/pwn/noobs/trouserstreak/Trouser.java index 18ad9472..9babe02d 100644 --- a/src/main/java/pwn/noobs/trouserstreak/Trouser.java +++ b/src/main/java/pwn/noobs/trouserstreak/Trouser.java @@ -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()); diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/BaseFinder.java b/src/main/java/pwn/noobs/trouserstreak/modules/BaseFinder.java index 0b5eb950..8a8d7ebb 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/BaseFinder.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/BaseFinder.java @@ -220,7 +220,7 @@ private Set> getDefaultCreatures() { .description("If the total amount of any of these found is greater than the Number specified, throw a base location.") .defaultValue( Blocks.CRAFTER, Blocks.BLACK_BED, Blocks.GRAY_BED, Blocks.LIGHT_BLUE_BED, Blocks.LIGHT_GRAY_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.ACACIA_BUTTON, Blocks.DARK_OAK_BUTTON, Blocks.POLISHED_BLACKSTONE_BUTTON, Blocks.SPRUCE_BUTTON, @@ -228,7 +228,7 @@ private Set> getDefaultCreatures() { Blocks.BLACK_CONCRETE, Blocks.BLUE_CONCRETE, Blocks.CYAN_CONCRETE, Blocks.BROWN_CONCRETE, Blocks.ORANGE_CONCRETE, Blocks.MAGENTA_CONCRETE, Blocks.LIGHT_BLUE_CONCRETE, Blocks.YELLOW_CONCRETE, Blocks.LIME_CONCRETE, Blocks.PINK_CONCRETE, Blocks.GRAY_CONCRETE, Blocks.LIGHT_GRAY_CONCRETE, Blocks.PURPLE_CONCRETE, Blocks.GREEN_CONCRETE, Blocks.BLACK_CONCRETE_POWDER, Blocks.BLUE_CONCRETE_POWDER, Blocks.CYAN_CONCRETE_POWDER, Blocks.BROWN_CONCRETE_POWDER, Blocks.WHITE_CONCRETE_POWDER, Blocks.ORANGE_CONCRETE_POWDER, Blocks.MAGENTA_CONCRETE_POWDER, Blocks.LIGHT_BLUE_CONCRETE_POWDER, Blocks.YELLOW_CONCRETE_POWDER, Blocks.LIME_CONCRETE_POWDER, Blocks.PINK_CONCRETE_POWDER, Blocks.GRAY_CONCRETE_POWDER, Blocks.LIGHT_GRAY_CONCRETE_POWDER, Blocks.PURPLE_CONCRETE_POWDER, Blocks.GREEN_CONCRETE_POWDER, Blocks.RED_CONCRETE_POWDER, Blocks.PURPLE_TERRACOTTA, Blocks.MAGENTA_TERRACOTTA, Blocks.PINK_TERRACOTTA, Blocks.MAGENTA_GLAZED_TERRACOTTA, Blocks.PINK_GLAZED_TERRACOTTA, Blocks.GRAY_GLAZED_TERRACOTTA, Blocks.BLUE_GLAZED_TERRACOTTA, Blocks.BROWN_GLAZED_TERRACOTTA, Blocks.GREEN_GLAZED_TERRACOTTA, - Blocks.EXPOSED_COPPER, Blocks.WEATHERED_COPPER, Blocks.OXIDIZED_COPPER, Blocks.CUT_COPPER, Blocks.EXPOSED_CUT_COPPER, Blocks.WEATHERED_CUT_COPPER, Blocks.CUT_COPPER_SLAB, Blocks.CUT_COPPER_STAIRS, Blocks.EXPOSED_CUT_COPPER_SLAB, Blocks.EXPOSED_CUT_COPPER_STAIRS, Blocks.WEATHERED_CUT_COPPER_SLAB, Blocks.WEATHERED_CUT_COPPER_STAIRS, Blocks.OXIDIZED_CUT_COPPER_SLAB, Blocks.OXIDIZED_CUT_COPPER_STAIRS, Blocks.COPPER_BULB, Blocks.EXPOSED_COPPER_BULB, Blocks.WEATHERED_COPPER_BULB, Blocks.OXIDIZED_COPPER_BULB, Blocks.CHISELED_COPPER, Blocks.EXPOSED_CHISELED_COPPER, Blocks.WEATHERED_CHISELED_COPPER, Blocks.OXIDIZED_CHISELED_COPPER, Blocks.COPPER_DOOR, Blocks.EXPOSED_COPPER_DOOR, Blocks.WEATHERED_COPPER_DOOR, Blocks.OXIDIZED_COPPER_DOOR, Blocks.COPPER_GRATE, Blocks.EXPOSED_COPPER_GRATE, Blocks.WEATHERED_COPPER_GRATE, Blocks.OXIDIZED_COPPER_GRATE, Blocks.COPPER_TRAPDOOR, Blocks.EXPOSED_COPPER_TRAPDOOR, Blocks.WEATHERED_COPPER_TRAPDOOR, + Blocks.OXIDIZED_COPPER, Blocks.CUT_COPPER, Blocks.EXPOSED_CUT_COPPER, Blocks.WEATHERED_CUT_COPPER, Blocks.CUT_COPPER_SLAB, Blocks.CUT_COPPER_STAIRS, Blocks.EXPOSED_CUT_COPPER_SLAB, Blocks.EXPOSED_CUT_COPPER_STAIRS, Blocks.WEATHERED_CUT_COPPER_SLAB, Blocks.WEATHERED_CUT_COPPER_STAIRS, Blocks.OXIDIZED_CUT_COPPER_SLAB, Blocks.OXIDIZED_CUT_COPPER_STAIRS, Blocks.COPPER_BULB, Blocks.EXPOSED_COPPER_BULB, Blocks.WEATHERED_COPPER_BULB, Blocks.OXIDIZED_COPPER_BULB, Blocks.CHISELED_COPPER, Blocks.EXPOSED_CHISELED_COPPER, Blocks.WEATHERED_CHISELED_COPPER, Blocks.OXIDIZED_CHISELED_COPPER, Blocks.COPPER_DOOR, Blocks.EXPOSED_COPPER_DOOR, Blocks.WEATHERED_COPPER_DOOR, Blocks.OXIDIZED_COPPER_DOOR, Blocks.COPPER_GRATE, Blocks.EXPOSED_COPPER_GRATE, Blocks.WEATHERED_COPPER_GRATE, Blocks.OXIDIZED_COPPER_GRATE, Blocks.COPPER_TRAPDOOR, Blocks.EXPOSED_COPPER_TRAPDOOR, Blocks.WEATHERED_COPPER_TRAPDOOR, Blocks.WAXED_EXPOSED_COPPER, Blocks.WAXED_WEATHERED_COPPER, Blocks.WAXED_EXPOSED_CUT_COPPER, Blocks.WAXED_WEATHERED_CUT_COPPER, Blocks.WAXED_EXPOSED_CUT_COPPER_SLAB, Blocks.WAXED_EXPOSED_CUT_COPPER_STAIRS, Blocks.WAXED_WEATHERED_CUT_COPPER_SLAB, Blocks.WAXED_WEATHERED_CUT_COPPER_STAIRS, Blocks.WAXED_EXPOSED_CHISELED_COPPER, Blocks.WAXED_WEATHERED_CHISELED_COPPER, Blocks.WAXED_EXPOSED_COPPER_DOOR, Blocks.WAXED_WEATHERED_COPPER_DOOR, Blocks.WAXED_EXPOSED_COPPER_GRATE, Blocks.WAXED_WEATHERED_COPPER_GRATE, Blocks.WAXED_COPPER_TRAPDOOR, Blocks.WAXED_EXPOSED_COPPER_TRAPDOOR, Blocks.WAXED_WEATHERED_COPPER_TRAPDOOR, Blocks.SOUL_TORCH, Blocks.SOUL_WALL_TORCH, Blocks.POTTED_MANGROVE_PROPAGULE, Blocks.POTTED_AZALEA_BUSH, Blocks.POTTED_CHERRY_SAPLING, Blocks.POTTED_FERN, Blocks.POTTED_ACACIA_SAPLING, Blocks.POTTED_WARPED_FUNGUS, Blocks.POTTED_WARPED_ROOTS, Blocks.POTTED_CRIMSON_FUNGUS, Blocks.POTTED_CRIMSON_ROOTS, Blocks.POTTED_OAK_SAPLING, Blocks.POTTED_WITHER_ROSE, Blocks.WITHER_ROSE, Blocks.CAKE, Blocks.CANDLE_CAKE, Blocks.BLUE_CANDLE_CAKE, Blocks.BLACK_CANDLE_CAKE, Blocks.BROWN_CANDLE_CAKE, Blocks.CYAN_CANDLE_CAKE, Blocks.GRAY_CANDLE_CAKE, Blocks.GREEN_CANDLE_CAKE, Blocks.LIGHT_BLUE_CANDLE_CAKE, Blocks.LIGHT_GRAY_CANDLE_CAKE, Blocks.LIME_CANDLE_CAKE, Blocks.MAGENTA_CANDLE_CAKE, Blocks.ORANGE_CANDLE_CAKE, Blocks.PINK_CANDLE_CAKE, Blocks.PURPLE_CANDLE_CAKE, Blocks.RED_CANDLE_CAKE, Blocks.WHITE_CANDLE_CAKE, Blocks.YELLOW_CANDLE_CAKE, @@ -255,7 +255,7 @@ private Set> getDefaultCreatures() { private final Setting> Blawcks2 = sglists.add(new BlockListSetting.Builder() .name("Block List #2 (Default)") .description("If the total amount of any of these found is greater than the Number specified, throw a base location.") - .defaultValue(Blocks.SPRUCE_WALL_SIGN, Blocks.POLISHED_DIORITE, Blocks.NOTE_BLOCK, Blocks.MANGROVE_WOOD) + .defaultValue(Blocks.SPRUCE_WALL_SIGN, Blocks.POLISHED_DIORITE, Blocks.NOTE_BLOCK, Blocks.MANGROVE_WOOD, Blocks.WEATHERED_COPPER) .filter(this::filterBlocks) .build() ); @@ -598,13 +598,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){ @@ -639,11 +646,7 @@ 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(); } @@ -651,7 +654,7 @@ public void onDeactivate() { private void onScreenOpen(OpenScreenEvent event) { if (event.screen instanceof DisconnectedScreen) { if (worldleaveremove.get()) { - baseChunks.clear(); + clearChunkData(); } } if (event.screen instanceof DownloadingTerrainScreen) { @@ -661,11 +664,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 @@ -688,7 +687,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) { @@ -743,7 +742,7 @@ else if (basefoundspamTicks >= bsefndtickdelay.get()) { if (autoreload.get()) { autoreloadticks++; if (autoreloadticks == removedelay.get() * 20) { - baseChunks.clear(); + clearChunkData(); if (load.get()) { loadData(); } @@ -754,7 +753,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; diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/BoatKill.java b/src/main/java/pwn/noobs/trouserstreak/modules/BoatKill.java new file mode 100644 index 00000000..e3d0841a --- /dev/null +++ b/src/main/java/pwn/noobs/trouserstreak/modules/BoatKill.java @@ -0,0 +1,67 @@ +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.text.Text; +import net.minecraft.entity.vehicle.BoatEntity; +import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket; +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 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 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(); + } +} \ No newline at end of file diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java b/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java index 1d94ae76..b6b21bc9 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java @@ -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; @@ -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; } @@ -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 @@ -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); } } } diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/NbtEditor.java b/src/main/java/pwn/noobs/trouserstreak/modules/NbtEditor.java index 768ffb49..b84d9e47 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/NbtEditor.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/NbtEditor.java @@ -3,8 +3,6 @@ import meteordevelopment.meteorclient.settings.*; import meteordevelopment.meteorclient.systems.modules.Module; import meteordevelopment.meteorclient.utils.player.ChatUtils; -import net.minecraft.block.entity.BeehiveBlockEntity; -import net.minecraft.block.entity.Sherds; import net.minecraft.component.*; import net.minecraft.component.type.*; import net.minecraft.enchantment.Enchantment; @@ -12,9 +10,7 @@ import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.inventory.ContainerLock; import net.minecraft.item.*; -import net.minecraft.item.trim.ArmorTrim; import net.minecraft.nbt.NbtCompound; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -62,7 +58,6 @@ public class NbtEditor extends Module { .defaultValue("wither") .visible(() -> mode.get() == Modes.Entity) .build()); - //Item mode doesn't work private final Setting 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.") @@ -291,7 +286,7 @@ public void onActivate() { for (RegistryKey enchantKey : enchants.get()) { RegistryEntry enchantEntry = enchantmentRegistry.entryOf(enchantKey); - item.addEnchantment(enchantEntry, level.get()); + item.addEnchantment(enchantEntry, level.get()); } item.set(DataComponentTypes.CUSTOM_NAME, Text.literal(nom.get()).formatted(Formatting.valueOf(nomcolor.get().toUpperCase()))); @@ -344,25 +339,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); } @@ -418,8 +408,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 diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java b/src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java index c1b565f2..b626ee75 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java @@ -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 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 NEW_OVERWORLD_BLOCKS = new HashSet<>(); static { NEW_OVERWORLD_BLOCKS.add(Blocks.DEEPSLATE); @@ -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){ @@ -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; } @@ -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()) { @@ -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> biomesPaletteContainer) { diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/OnlinePlayerActivityDetector.java b/src/main/java/pwn/noobs/trouserstreak/modules/OnlinePlayerActivityDetector.java index fb04e1bc..ac244d06 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/OnlinePlayerActivityDetector.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/OnlinePlayerActivityDetector.java @@ -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 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 11658671..5839fc0f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -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": [