Skip to main content

Module sign_block

Module sign_block 

Source
Expand description

Sign block behavior implementation.

Handles sign placement and block entity creation for all sign types.

StructsΒ§

CeilingHangingSignBlock
Behavior for ceiling hanging sign blocks.
StandingSignBlock
Behavior for standing sign blocks (placed on ground).
WallHangingSignBlock
Behavior for wall hanging sign blocks.
WallSignBlock
Behavior for wall sign blocks (attached to walls).

FunctionsΒ§

can_attach_to πŸ”’
Checks if a wall hanging sign can attach to a neighboring block.
can_ceiling_hanging_sign_survive πŸ”’
Checks if a ceiling hanging sign can survive at the given position.
can_support_standing_sign πŸ”’
Checks if a block state can support a standing sign.
can_wall_hanging_sign_survive πŸ”’
Checks if a wall hanging sign can survive at the given position.
can_wall_sign_survive πŸ”’
Checks if a wall sign can survive at the given position with the given facing.
convert_to_rotation_segment πŸ”’
Converts a rotation in degrees to a 16-segment rotation value (0-15).
get_nearest_looking_directions πŸ”’
Gets the nearest looking directions from the player’s rotation.
get_sign_rotation_degrees πŸ”’
Gets the Y rotation of a sign in degrees from its block state.
is_facing_front_text πŸ”’
Calculates whether the player is facing the front of a sign.
rotation_to_direction πŸ”’
Converts a rotation segment (0-15) to a cardinal direction, if applicable.
try_open_sign_editor πŸ”’
Attempts to open the sign editor for a player.