Expand description
Player movement physics and validation.
This module handles server-side movement simulation and anti-cheat checks. It implements collision detection and physics similar to vanilla Minecraft.
ModulesΒ§
- input π
- Last client input state sent by the player.
- state π
- Movement tracking state for position validation and anti-cheat rate limiting.
- teleport π
- Teleport state tracking for server-side position confirmation.
StructsΒ§
- Player
Floating πValidation - Player
Input - Vanilla
Inputsnapshot from the latest serverbound player-input packet.
ConstantsΒ§
- CLAMP_
HORIZONTAL - Horizontal position clamping limit (matches vanilla).
- CLAMP_
VERTICAL - Vertical position clamping limit (matches vanilla).
- DEFAULT_
GRAVITY - Default gravity for players (blocks/tickΒ²). Vanilla uses 0.08.
- SPEED_
THRESHOLD_ FLYING - Maximum movement speed threshold for elytra flight (meters per tick squared).
- SPEED_
THRESHOLD_ NORMAL - Maximum movement speed threshold for normal movement (meters per tick squared).
FunctionsΒ§
- clamp_
horizontal - Clamps a horizontal coordinate to vanilla limits.
- clamp_
vertical - Clamps a vertical coordinate to vanilla limits.
- wrap_
degrees π