Expand description
Sign block behavior implementation.
Handles sign placement and block entity creation for all sign types.
StructsΒ§
- Ceiling
Hanging Sign Block - Behavior for ceiling hanging sign blocks.
- Standing
Sign Block - Behavior for standing sign blocks (placed on ground).
- Wall
Hanging Sign Block - Behavior for wall hanging sign blocks.
- Wall
Sign Block - 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.