Package com.sk89q.worldedit.world.item
Class ItemType
java.lang.Object
com.sk89q.worldedit.world.item.ItemType
- All Implemented Interfaces:
RegistryItem
,Keyed
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the block representation of this item type, if it exists.getId()
The id of this object in the registry.int
Get the material for this ItemType.getName()
Deprecated.com.sk89q.worldedit.util.formatting.text.Component
boolean
Gets whether this item type has a block representation.int
hashCode()
void
setInternalId
(int internalId) toString()
-
Field Details
-
REGISTRY
-
-
Constructor Details
-
ItemType
-
-
Method Details
-
getId
Description copied from interface:Keyed
The id of this object in the registry. Must be unique, and lowercase. Certain registries (e.g Namespaced ones) may have additional restrictions. -
setInternalId
public void setInternalId(int internalId) - Specified by:
setInternalId
in interfaceRegistryItem
-
getInternalId
public int getInternalId()- Specified by:
getInternalId
in interfaceRegistryItem
-
getRichName
public com.sk89q.worldedit.util.formatting.text.Component getRichName() -
getName
Deprecated.Names are translatable now, usegetRichName()
.Gets the name of this item, or the ID if the name cannot be found.- Returns:
- The name, or ID
-
hasBlockType
public boolean hasBlockType()Gets whether this item type has a block representation.- Returns:
- If it has a block
-
getBlockType
Gets the block representation of this item type, if it exists.- Returns:
- The block representation
-
getDefaultState
-
getMaterial
Get the material for this ItemType.- Returns:
- The material
-
toString
-
hashCode
public int hashCode() -
equals
-
getRichName()
.