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/ViewLock.javaJava · 31 lines · 1.1 KB
Locks your camera.
SettingsLockCurrentPitchPitchValueYawYawValue
| 1 | package thunder.hack.features.modules.player;
|
| 2 |
|
| 3 | import com.mojang.blaze3d.vertex.PoseStack;
|
| 4 | import thunder.hack.features.modules.Module;
|
| 5 | import thunder.hack.setting.Setting;
|
| 6 |
|
| 7 | public class ViewLock extends Module {
|
| 8 | public ViewLock() {
|
| 9 | super("ViewLock", Category.PLAYER);
|
| 10 | }
|
| 11 |
|
| 12 | private final Setting<Boolean> lockCurrent = new Setting<>("LockCurrent", true);
|
| 13 | public final Setting<Boolean> pitch = new Setting<>("Pitch", true);
|
| 14 | public final Setting<Float> pitchValue = new Setting<>("PitchValue", 0f, -90f, 90f, v -> pitch.getValue());
|
| 15 | public final Setting<Boolean> yaw = new Setting<>("Yaw", true);
|
| 16 | public final Setting<Float> yawValue = new Setting<>("YawValue", 0f, -180f, 180f, v -> yaw.getValue());
|
| 17 |
|
| 18 | @Override
|
| 19 | public void onEnable() {
|
| 20 | if(lockCurrent.getValue()) {
|
| 21 | yawValue.setValue(mc.player.getYRot());
|
| 22 | pitchValue.setValue(mc.player.getXRot());
|
| 23 | }
|
| 24 | }
|
| 25 |
|
| 26 | public void onRender3D(PoseStack m) {
|
| 27 | if (pitch.getValue()) mc.player.setXRot(pitchValue.getValue());
|
| 28 | if (yaw.getValue()) mc.player.setYRot(yawValue.getValue());
|
| 29 | }
|
| 30 | }
|
| 31 |
|