Class RotationManager

java.lang.Object
me.hackware.api.RotationManager

public final class RotationManager extends Object
Single-slot rotation manager.

Modules submit a rotation each tick they want to be active. Higher priority replaces a lower-priority active request. The active request lives for one tick — the owner must re-submit each tick to keep it active. There is no queue, no suppliers, no instant flag.

Three submission entry points:

  • Method Details

    • get

      public static RotationManager get()
    • init

      public void init()
    • justTeleported

      public boolean justTeleported(int withinTicks)
      True within withinTicks client ticks of the last server teleport. Used by ClientInputMixin to suppress a frame-perfect jump on the ack tick: Grim resets its sim to the teleport position and doesn't know the client's ground state there yet, so a jump (or a KB verified) on that exact tick is unpredictable — the one-off Simulation .42 (unpredicted jump) and AntiKB .078 / A: 0.0 (airborne-vs-grounded phase mismatch) flags while jump-spamming through pearl teleports. No human times a jump onto the ack tick, so a one-tick suppression is vanilla-invisible.
    • requestRotation

      public boolean requestRotation(String id, double priority, float yaw, float pitch)
      Submit a rotation using the global mode from the Rotations settings module (defaults to MOTION if the module is missing).
      Returns:
      true if accepted (took the active slot), false if a higher-priority request already owns the slot this tick.
    • requestMotionRotation

      public boolean requestMotionRotation(String id, double priority, float yaw, float pitch)
      Force MOTION mode — rotation is applied via vanilla sendPosition.
    • requestMotionRotationCameraAnchored

      public boolean requestMotionRotationCameraAnchored(String id, double priority, float yaw, float pitch)
      Force MOTION mode, anchoring the sent yaw to the real CAMERA yaw instead of the last-sent yaw. For movement rotations (Sprint) whose target oscillates ~180° via WASD flips: serverYaw-anchoring resolves every 180° flip the same way (−180) and spirals the sent yaw unbounded (−298→−478→−658…). Camera-anchoring keeps it oscillating around the stable camera yaw. Do NOT use for combat aim — an aim target hovering exactly 180° from the camera would flip 360° on tiny changes (AimModulo360).
    • requestSilentRotation

      public boolean requestSilentRotation(String id, double priority, float yaw, float pitch)
      Force SILENT mode — an extra PosRot packet is sent immediately so following action packets validate against the spoofed angles. The next vanilla sendPosition restores the real yaw.
    • release

      public void release(String id)
      Explicitly release the active request if it is owned by id. Modules normally don't need this — just stop re-submitting.
    • isRotating

      public boolean isRotating()
      Whether any rotation request is currently active.
    • isMotionActive

      public boolean isMotionActive()
      Whether the active request is in MOTION mode.
    • isSilentActive

      public boolean isSilentActive()
      Whether the active request is in SILENT mode.
    • getActiveId

      public String getActiveId()
      The id of the active request, or null.
    • getActivePriority

      public double getActivePriority()
      The priority of the active request, or Double.NEGATIVE_INFINITY.
    • getYaw

      public float getYaw()
      Current rotation target yaw — the angle that gets sent in the next packet. Returns the real client yaw when no request is active.
    • getPitch

      public float getPitch()
      Current rotation target pitch — clamped to [-90, 90]. Returns the real client pitch when no request is active.
    • getRealYaw

      public float getRealYaw()
      The player's real (un-spoofed) yaw at the start of this tick.
    • getRealPitch

      public float getRealPitch()
      The player's real (un-spoofed) pitch at the start of this tick.
    • getServerYaw

      public float getServerYaw()
      The yaw the server most recently saw.
    • getServerPitch

      public float getServerPitch()
      The pitch the server most recently saw.
    • getLastSentX

      public double getLastSentX()
    • getLastSentY

      public double getLastSentY()
    • getLastSentZ

      public double getLastSentZ()
    • getLastSentYaw

      public float getLastSentYaw()
    • getLastSentPitch

      public float getLastSentPitch()
    • getLastSentOnGround

      public boolean getLastSentOnGround()