Expand description
Game mode specific logic for player interactions. Game mode specific logic for player interactions.
This module implements the logic from Javaโs ServerPlayerGameMode, particularly
the useItemOn method that handles block placement and block interactions.
Modulesยง
- block_
breaking - Block breaking state machine for players.
- block_
interaction ๐ - entity_
interaction ๐ - item_
interaction ๐ - player_
methods ๐ - raycast ๐
Structsยง
- Player
Game ๐Mode State - Current and previous player game mode stored as one coherent state.
Constantsยง
- ATTACK_
RANGE_ ๐BUFFER - CREATIVE_
BLOCK_ ๐RANGE_ MODIFIER_ AMOUNT - CREATIVE_
ENTITY_ ๐RANGE_ MODIFIER_ AMOUNT - ENTITY_
INTERACTION_ ๐RANGE_ BUFFER - FLIGHT_
DISABLE_ ๐RANGE
Functionsยง
- use_
item - Handles using an item (general usage like right-clicking air).
- use_
item_ on - Handles using an item on a block.