Modifier and Type | Field and Description |
---|---|
static NamespacedRegistry<BlockType> |
REGISTRY |
Constructor and Description |
---|
BlockType(java.lang.String id) |
BlockType(java.lang.String id,
java.util.function.Function<BlockState,BlockState> values) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<BlockState> |
getAllStates()
Gets a list of all possible states for this BlockType.
|
BlockState |
getDefaultState()
Gets the default state of this block type.
|
FuzzyBlockState |
getFuzzyMatcher() |
java.lang.String |
getId()
Gets the ID of this block.
|
ItemType |
getItemType()
Gets the item representation of this block type, if it exists.
|
int |
getLegacyData()
Deprecated.
|
int |
getLegacyId()
Deprecated.
|
BlockMaterial |
getMaterial()
Get the material for this BlockType.
|
java.lang.String |
getName()
Deprecated.
The name is now translatable, use
getRichName() . |
java.util.List<? extends Property<?>> |
getProperties()
Gets the properties of this BlockType.
|
<V> Property<V> |
getProperty(java.lang.String name)
Gets a property by name.
|
java.util.Map<java.lang.String,? extends Property<?>> |
getPropertyMap()
Gets the properties of this BlockType in a
key->property mapping. |
com.sk89q.worldedit.util.formatting.text.Component |
getRichName() |
BlockState |
getState(java.util.Map<Property<?>,java.lang.Object> key)
Gets a state of this BlockType with the given properties.
|
int |
hashCode() |
boolean |
hasItemType()
Gets whether this block type has an item representation.
|
java.lang.String |
toString() |
public static final NamespacedRegistry<BlockType> REGISTRY
public BlockType(java.lang.String id)
public BlockType(java.lang.String id, java.util.function.Function<BlockState,BlockState> values)
public java.lang.String getId()
public com.sk89q.worldedit.util.formatting.text.Component getRichName()
@Deprecated public java.lang.String getName()
getRichName()
.public java.util.Map<java.lang.String,? extends Property<?>> getPropertyMap()
key->property
mapping.public java.util.List<? extends Property<?>> getProperties()
public <V> Property<V> getProperty(java.lang.String name)
name
- The namepublic BlockState getDefaultState()
public FuzzyBlockState getFuzzyMatcher()
public java.util.List<BlockState> getAllStates()
public BlockState getState(java.util.Map<Property<?>,java.lang.Object> key)
public boolean hasItemType()
@Nullable public ItemType getItemType()
public BlockMaterial getMaterial()
@Deprecated public int getLegacyId()
DO NOT USE THIS.
@Deprecated public int getLegacyData()
DO NOT USE THIS.
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object