Skip to main content

Module block_breaking

Module block_breaking 

Source
Expand description

Block breaking state machine for players.

This module implements the logic from Javaโ€™s ServerPlayerGameMode for handling block breaking, including progress tracking and validation.

Structsยง

BlockBreakingManager
Manages the block breaking state for a player.

Enumsยง

BlockBreakAction
Block break action types.

Functionsยง

drop_block_loot ๐Ÿ”’
Drops loot for a destroyed block using its loot table.
get_destroy_progress ๐Ÿ”’
Gets the destroy progress per tick for a block.
is_air ๐Ÿ”’
Checks if a block state is air.
requires_correct_tool ๐Ÿ”’
Checks if a block requires the correct tool for drops.