diff --git a/src/openonyx/features/player/internal/group_d/ScaffoldWatchdogMode.java b/src/openonyx/features/player/internal/group_d/ScaffoldWatchdogMode.java new file mode 100644 index 0000000..1855dd9 --- /dev/null +++ b/src/openonyx/features/player/internal/group_d/ScaffoldWatchdogMode.java @@ -0,0 +1,46 @@ +package openonyx.features.player.internal.group_d; + +import meteordevelopment.orbit.EventHandler; +import net.minecraft.entity.Entity; +import openonyx.configuration.internal.TickEndEvent; +import openonyx.core.MinecraftAccess; +import openonyx.history.ModeOption; +import openonyx.utilities.PlayerUtils; + +public class ScaffoldWatchdogMode extends ModeOption implements MinecraftAccess { + public static final ScaffoldWatchdogMode INSTANCE = new ScaffoldWatchdogMode(); + private static final float e = 0.8F; + + private ScaffoldWatchdogMode() { + super("Watchdog"); + } + + @EventHandler + private void onTickEnd(TickEndEvent tickEndEvent) { + if (mc.thePlayer != null) { + if (mc.gameSettings.keyBindJump.isKeyDown()) { + if (mc.thePlayer.onGround && !l()) { + mc.thePlayer.jump(); + } + + if (PlayerUtils.L((Entity)mc.thePlayer) == 0.0) { + switch (PlayerUtils.L(mc.thePlayer)) { + case 4: + while (false) { + } + + mc.thePlayer.motionY -= 0.03; + return; + case 5: + mc.thePlayer.motionY -= 0.5; + return; + } + } + } + } + } + + private static boolean l() { + return Math.abs(mc.thePlayer.moveForward) >= 0.8F || Math.abs(mc.thePlayer.moveStrafing) >= 0.8F; + } +}