public class LegacyBlockRegistry extends java.lang.Object implements BlockRegistry
BundledBlockData
to serve information
about blocks.Constructor and Description |
---|
LegacyBlockRegistry() |
Modifier and Type | Method and Description |
---|---|
BaseBlock |
createFromId(int id)
Create a new block using its legacy numeric ID.
|
BaseBlock |
createFromId(java.lang.String id)
Create a new block using its ID.
|
BlockMaterial |
getMaterial(BaseBlock block)
Get the material for the given block.
|
java.util.Map<java.lang.String,? extends State> |
getStates(BaseBlock block)
Get an unmodifiable map of states for this block.
|
@Nullable public BaseBlock createFromId(java.lang.String id)
BlockRegistry
createFromId
in interface BlockRegistry
id
- the id@Nullable public BaseBlock createFromId(int id)
BlockRegistry
createFromId
in interface BlockRegistry
id
- the id@Nullable public BlockMaterial getMaterial(BaseBlock block)
BlockRegistry
getMaterial
in interface BlockRegistry
block
- the block@Nullable public java.util.Map<java.lang.String,? extends State> getStates(BaseBlock block)
BlockRegistry
getStates
in interface BlockRegistry
block
- the block