BlockRegistry
Registry to get, set and break blocks.
Block IDs are resource locations, where the namespace is the ID of a block registry, for example craftengine:default/palm_log. IDs without namespace or with the mimic namespace are searched over all registries.
Implementations work with IDs without the registry namespace. A plugin's own namespace becomes the first path segment: default:palm_log ->default/palm_log.
Methods changing blocks should be called from the server thread. They fire no place or break events and make no protection checks, the caller is responsible for both. Block physics is applied as usual, so neighboring blocks are updated.
Since
0.9.0
Properties
Inherited properties
Functions
Breaks the given block with a suitable tool, dropping items on the ground.
Breaks the given block with the tool and passes the dropped items to the dropsConsumer.
Returns ID of the given block, or null if the block doesn't belong to this registry.
Returns ID of the block placed by the given blockItem, or null if it doesn't belong to this registry.
Returns true if a block with the given blockId exists.