Skip to content

Commit

Permalink
0.9.6 MaceKill exploit added, basefinder false positive fix
Browse files Browse the repository at this point in the history
**0.9.6**
- Added new **MaceKill** module. This exploits the new Mace mechanics to make the Mace super OP everytime you swing it instead of just when you drop from a height
- Removed Red Candles from **BaseFinder**'s default lists as they can throw a false positive from trial chambers (1.21 trouser version only)
  • Loading branch information
etianl authored Jun 26, 2024
1 parent 27d8251 commit 2215d34
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ This will return the lowest block placed with AutoMountain until AutoLavacast is
- **InstaSafetyBox:** Places a box around you for safety using the hardest blocks available in your hotbar. Also with adjustable range for thic box. (Credits to etianl :D)
- **LavaAura:** Automatically places and picks up lava buckets at an entity's position on a tick delay, or sets the entity on fire using flint and steel or fire charges. Also has the option of placing lavabuckets or fire on every block face which may be useful in creative mode. (Credits to etianl :D)
- **LecternCrash:** Crash 1.18.X vanilla servers and possibly below. (Credits to Coderx-Gamer)
- **MaceKill:** Exploits Mace mechanics to make the Mace super OP everytime you swing it instead of just when you drop from a height. (Credits to etianl :D)
- **NbtEditor:** Requires Creative mode. Generates custom entities in the form of a custom spawn egg, generate items with custom enchantments (Only in Minecraft 1.20.4 and below), and potions with custom effects all based on the settings you configure. It can also copy the Nbt data from one item to another. (Credits to etianl :D)
- **NewerNewChunks:** NewChunks module with new newchunk estimation exploits, and the ability to save chunk data for later! Also with special options for tracing servers that have been updated from a version before the build limit updates, which throw false positives normally. (Credits to Meteor Rejects, and BleachHack from where it was ported, and etianl for updating :D.)

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.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version=0.9.5-1.21
mod_version=0.9.6-1.21
maven_group=pwn.noobs
archives_base_name=1trouser-streak

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/pwn/noobs/trouserstreak/Trouser.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public void onInitialize() {
Modules.get().add(new BaseFinder());
Modules.get().add(new StorageLooter());
Modules.get().add(new LavaAura());
Modules.get().add(new MaceKill());
Modules.get().add(new SuperInstaMine());
Modules.get().add(new InstaMineNuker());
Modules.get().add(new BetterScaffold());
Expand Down Expand Up @@ -86,4 +87,4 @@ public String getPackage() {
return "pwn.noobs.trouserstreak";
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public class BaseFinder extends Module {
private final Setting<List<Block>> 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.RED_CANDLE, Blocks.MANGROVE_WOOD)
.defaultValue(Blocks.SPRUCE_WALL_SIGN, Blocks.POLISHED_DIORITE, Blocks.NOTE_BLOCK, Blocks.MANGROVE_WOOD)
.filter(this::filterBlocks)
.build()
);
Expand Down
73 changes: 73 additions & 0 deletions src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package pwn.noobs.trouserstreak.modules;

import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixininterface.IPlayerInteractEntityC2SPacket;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import pwn.noobs.trouserstreak.Trouser;

import java.lang.reflect.Method;

public class MaceKill extends Module {
private final SettingGroup specialGroup = settings.createGroup("Values higher than 10 only work on Paper/Spigot");
private final Setting<Integer> fallHeight = specialGroup.add(new IntSetting.Builder()
.name("Mace Power (Fall height)")
.description("Simulates a fall from this distance")
.defaultValue(10)
.sliderRange(1,100)
.min(1)
.build());

public MaceKill() {
super(Trouser.Main, "MaceKill", "Makes the Mace powerful when swung.");
}

@EventHandler
private void onSendPacket(PacketEvent.Send event) {
if (event.packet instanceof IPlayerInteractEntityC2SPacket) {
IPlayerInteractEntityC2SPacket packet = (IPlayerInteractEntityC2SPacket) event.packet;
try {
Class<?> packetClass = packet.getClass();
Method getTypeMethod = packetClass.getDeclaredMethod("getType");
getTypeMethod.setAccessible(true);
Enum<?> interactType = (Enum<?>) getTypeMethod.invoke(packet);

if (interactType.name().equals("ATTACK") && mc.player.getInventory().getMainHandStack().getItem() == Items.MACE) {
double blocks = fallHeight.get();
int packetsRequired = (int) Math.ceil(Math.abs(blocks / 10));

if (packetsRequired > 20) {
packetsRequired = 1;
}

if (mc.player.hasVehicle()) {
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
}
mc.player.getVehicle().setPosition(mc.player.getVehicle().getX(), mc.player.getVehicle().getY() + blocks, mc.player.getVehicle().getZ());
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
} else {
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
}
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + blocks, mc.player.getZ(), true));
}

// Move back to original position
if (mc.player.hasVehicle()) {
mc.player.getVehicle().setPosition(mc.player.getVehicle().getX(), mc.player.getVehicle().getY() - blocks, mc.player.getVehicle().getZ());
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
} else {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true));
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
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": "0.9.5",
"version": "0.9.6",
"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 2215d34

Please sign in to comment.