-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.9.6 MaceKill exploit added, basefinder false positive fix
**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
Showing
6 changed files
with
79 additions
and
4 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
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
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
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
73 changes: 73 additions & 0 deletions
73
src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.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,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(); | ||
} | ||
} | ||
} | ||
} |
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