Interface BlockRegistry
- All Known Implementing Classes:
BundledBlockRegistry
public interface BlockRegistry
Provides information on blocks and provides methods to create them.
-
Method Summary
Modifier and TypeMethodDescriptionGet an unmodifiable map of all block propertiesRetrieve the internal ID for a given state, if possible.default BlockMaterial
getMaterial
(BlockState state) 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.default Collection<String>
values()
Register all blocks.
-
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
-
getMaterial
-
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
-
values
Register all blocks. -
getAllProperties
Get an unmodifiable map of all block properties- Returns:
- a map of states where the key is the property's ID
-
getRichName(BlockType)
.