Package com.sk89q.worldedit.world.block
Class BlockType
java.lang.Object
com.sk89q.worldedit.world.block.BlockType
- All Implemented Interfaces:
Keyed
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets a list of all possible states for this BlockType.Gets the default state of this block type.getId()
Gets the ID of this block.Gets the item representation of this block type, if it exists.int
Deprecated.int
Deprecated.Get the material for this BlockType.getName()
Deprecated.Gets the properties of this BlockType.<V> Property<V>
getProperty
(String name) Gets a property by name.Gets the properties of this BlockType in akey->property
mapping.com.sk89q.worldedit.util.formatting.text.Component
Gets a state of this BlockType with the given properties.int
hashCode()
boolean
Gets whether this block type has an item representation.toString()
-
Field Details
-
REGISTRY
-
-
Constructor Details
-
BlockType
-
BlockType
-
-
Method Details
-
getId
Gets the ID of this block. -
getRichName
public com.sk89q.worldedit.util.formatting.text.Component getRichName() -
getName
Deprecated.The name is now translatable, usegetRichName()
.Gets the name of this block, or the ID if the name cannot be found.- Returns:
- The name, or ID
-
getPropertyMap
Gets the properties of this BlockType in akey->property
mapping.- Returns:
- The properties map
-
getProperties
Gets the properties of this BlockType.- Returns:
- the properties
-
getProperty
Gets a property by name.- Parameters:
name
- The name- Returns:
- The property
-
getDefaultState
Gets the default state of this block type.- Returns:
- The default state
-
getFuzzyMatcher
-
getAllStates
Gets a list of all possible states for this BlockType.- Returns:
- All possible states
-
getState
Gets a state of this BlockType with the given properties.- Returns:
- The state, if it exists
-
hasItemType
public boolean hasItemType()Gets whether this block type has an item representation.- Returns:
- If it has an item
-
getItemType
Gets the item representation of this block type, if it exists.- Returns:
- The item representation
-
getMaterial
Get the material for this BlockType.- Returns:
- The material
-
getLegacyId
Deprecated.Gets the legacy ID. Needed for legacy reasons.DO NOT USE THIS.
- Returns:
- legacy id or 0, if unknown
-
getLegacyData
Deprecated.Gets the legacy data. Needed for legacy reasons.DO NOT USE THIS.
- Returns:
- legacy data or 0, if unknown
-
toString
-
hashCode
public int hashCode() -
equals
-
getRichName()
.