ClassAbilityGestureState

public final class ClassAbilityGestureState

Pure state machine for the Java F-key ability layer.

F opens a short selection window. A second plain F inside that window selects mobility. Hotbar keys 1, 2 and 3 select mobility, signature and utility. Keys 7, 8 and 9 mirror those bindings so a player can still activate the ability assigned to their already-selected slot, which a vanilla client does not report as a slot change. Left click selects signature; right click selects utility inside the window. Jumping does not change this state. The state contains no Bukkit objects, which keeps timing and precedence testable without a server.

Types

Link copied to clipboard
public enum Outcome
Link copied to clipboard
public final class Transition extends Record

Properties

Link copied to clipboard
public final static long CHORD_WINDOW_TICKS
600 ms at the normal server tick rate.

Functions

Link copied to clipboard
Link copied to clipboard
public boolean isOpenAt(long currentTick)
Link copied to clipboard
Resolves a left click while the F chord is open: it selects signature.
Link copied to clipboard
public ClassAbilityGestureState.Transition pressF(long currentTick, boolean sneaking)
Link copied to clipboard
Resolves a right click while the F chord is open: it selects utility.
Link copied to clipboard
public ClassAbilityGestureState.Transition selectHotbar(long currentTick, int zeroBasedHotbarSlot)
Resolves a zero-based vanilla hotbar selection while the F chord is open.