Logs library
The builtin:logdef library gives helpers for registering log-like blocks.
Importing
Function: logdef.on_place(identifier) -> function
This function returns an on_place callback for a given log identifier.
Arguments
identifieris the namespaced block ID. If you omit the namespace, the engine usescore.NAMESPACE.
Return value
- A function that implements log placement logic for block registration
Function: logdef.add_block(identifier, prototype) -> integer
A wrapper around blocks.add that defines a log block family.
Arguments
identifieris the namespaced block ID. If you omit the namespace, the engine usescore.NAMESPACE.prototypeis the base block definition the function builds on
Return value
- Numeric block ID
Notes
- The registered block family gets an
orientationstate and variants fornorth,east, andup.