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).

ConstantsΒ§

ATTACHED πŸ”’
HORIZONTAL_FACING πŸ”’
ROTATION_16 πŸ”’

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.
facing_text_slot
Calculates which side of a sign the player is facing.
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.
open_sign_editor_on_place πŸ”’
Opens the front text editor for the player who just placed the sign.
open_text_edit πŸ”’
Opens the sign editor for player, taking the edit lock.
rotation_to_direction πŸ”’
Converts a rotation segment (0-15) to a cardinal direction, if applicable.
try_apply_sign_item πŸ”’
try_open_sign_editor πŸ”’
Attempts to open the sign editor for a player.