Full module source: 1 implementation
Every implementation below is the complete module file, verbatim. Expand a client to read its code.
MelaHack (ThunderHack fork)PLAYERsrc/main/java/thunder/hack/features/modules/player/NoServerRotate.javaJava · 25 lines · 1010 B
Prevents the server from rotating your camera.
| 1 | package thunder.hack.features.modules.player;
|
| 2 |
|
| 3 | import meteordevelopment.orbit.EventHandler;
|
| 4 | import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
|
| 5 | import net.minecraft.world.entity.PositionMoveRotation;
|
| 6 | import thunder.hack.events.impl.PacketEvent;
|
| 7 | import thunder.hack.injection.accesors.IPlayerPositionLookS2CPacket;
|
| 8 | import thunder.hack.features.modules.Module;
|
| 9 |
|
| 10 | public class NoServerRotate extends Module {
|
| 11 | public NoServerRotate() {
|
| 12 | super("NoServerRotate", Category.PLAYER);
|
| 13 | }
|
| 14 |
|
| 15 | @EventHandler
|
| 16 | public void onPacketReceive(PacketEvent.Receive e) {
|
| 17 | if (fullNullCheck()) return;
|
| 18 | if (e.getPacket() instanceof ClientboundPlayerPositionPacket pac) {
|
| 19 | PositionMoveRotation change = pac.change();
|
| 20 | PositionMoveRotation updated = new PositionMoveRotation(change.position(), change.deltaMovement(), mc.player.getYRot(), mc.player.getXRot());
|
| 21 | ((IPlayerPositionLookS2CPacket) (Object) pac).setChange(updated);
|
| 22 | }
|
| 23 | }
|
| 24 | }
|
| 25 |
|
Utilities (1)
IPlayerPositionLookS2CPacket.javaJava · 15 lines · 492 B
| 1 | package thunder.hack.injection.accesors;
|
| 2 |
|
| 3 | import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
|
| 4 | import net.minecraft.world.entity.PositionMoveRotation;
|
| 5 | import org.spongepowered.asm.mixin.Mixin;
|
| 6 | import org.spongepowered.asm.mixin.Mutable;
|
| 7 | import org.spongepowered.asm.mixin.gen.Accessor;
|
| 8 |
|
| 9 | @Mixin(ClientboundPlayerPositionPacket.class)
|
| 10 | public interface IPlayerPositionLookS2CPacket {
|
| 11 | @Mutable
|
| 12 | @Accessor("change")
|
| 13 | void setChange(PositionMoveRotation change);
|
| 14 | }
|
| 15 |
|
Mixins (1)
IPlayerPositionLookS2CPacket.javaJava · 15 lines · 492 B
@Mixin(ClientboundPlayerPositionPacket.class)
| 1 | package thunder.hack.injection.accesors;
|
| 2 |
|
| 3 | import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
|
| 4 | import net.minecraft.world.entity.PositionMoveRotation;
|
| 5 | import org.spongepowered.asm.mixin.Mixin;
|
| 6 | import org.spongepowered.asm.mixin.Mutable;
|
| 7 | import org.spongepowered.asm.mixin.gen.Accessor;
|
| 8 |
|
| 9 | @Mixin(ClientboundPlayerPositionPacket.class)
|
| 10 | public interface IPlayerPositionLookS2CPacket {
|
| 11 | @Mutable
|
| 12 | @Accessor("change")
|
| 13 | void setChange(PositionMoveRotation change);
|
| 14 | }
|
| 15 |
|