Interface BlockRegistry
- All Known Implementing Classes:
BundledBlockRegistry
public interface BlockRegistry
Provides information on blocks and provides methods to create them.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the internal ID for a given state, if possible.getMaterial
(BlockType blockType) Get the material for the given block.default String
Deprecated.getProperties
(BlockType blockType) Get an unmodifiable map of states for this block.com.sk89q.worldedit.util.formatting.text.Component
getRichName
(BlockType blockType) Gets the name for the given block.
-
Method Details
-
getRichName
Gets the name for the given block.- Parameters:
blockType
- the block- Returns:
- The name
-
getName
Deprecated.Names are now translatable, usegetRichName(BlockType)
.Gets the name for the given block.- Parameters:
blockType
- the block- Returns:
- The name, or null if it's unknown
-
getMaterial
Get the material for the given block.- Parameters:
blockType
- the block- Returns:
- the material, or null if the material information is not known
-
getProperties
Get an unmodifiable map of states for this block.- Parameters:
blockType
- the block- Returns:
- a map of states where the key is the state's ID
-
getInternalBlockStateId
Retrieve the internal ID for a given state, if possible.- Parameters:
state
- The block state- Returns:
- the internal ID of the state
-
getRichName(BlockType)
.