public class BundledBlockData
extends java.lang.Object
A new instance cannot be created. Use getInstance()
to get
an instance.
The data is read from a JSON file that is bundled with WorldEdit. If
reading fails (which occurs when this class is first instantiated), then
the methods will return null
s for all blocks.
Modifier and Type | Method and Description |
---|---|
static BundledBlockData |
getInstance()
Get a singleton instance of this object.
|
BlockMaterial |
getMaterialById(int id)
Get the material properties for the given block.
|
java.util.Map<java.lang.String,? extends State> |
getStatesById(int id)
Get the states for the given block.
|
java.lang.Integer |
toLegacyId(java.lang.String id)
Convert the given string ID to a legacy numeric ID.
|
@Nullable public java.lang.Integer toLegacyId(java.lang.String id)
id
- the ID@Nullable public BlockMaterial getMaterialById(int id)
id
- the legacy numeric ID@Nullable public java.util.Map<java.lang.String,? extends State> getStatesById(int id)
id
- the legacy numeric IDpublic static BundledBlockData getInstance()