public class Item extends ComponentProvider<ComponentMap> implements Identifiable, Storable, java.lang.Cloneable, Translatable
| Modifier and Type | Class and Description |
|---|---|
static class |
Item.RightClickEvent |
static class |
Item.TooltipEvent |
static class |
Item.UseEvent |
ComponentProvider.ComponentAdded, ComponentProvider.ComponentRemovedcomponents, events| Constructor and Description |
|---|
Item() |
| Modifier and Type | Method and Description |
|---|---|
int |
addCount(int size)
Adds size to this ItemStack
|
Item |
clone() |
Color |
colorMultiplier()
Deprecated.
|
int |
count() |
boolean |
equals(java.lang.Object o) |
ItemFactory |
getFactory()
Called to get the ItemFactory that refers to this Block class.
|
java.lang.String |
getID()
Get the ID to identify this object by
|
java.lang.String |
getLocalizedName()
Gets the localized name of this object.
|
int |
getMaxCount() |
java.lang.String |
getUnlocalizedName()
Gets the unlocalized name of this object.
|
int |
hashCode() |
boolean |
sameItemType(Item item)
Check if this Item is of type of another Item.
|
Item |
setCount(int size)
Sets new size of this ItemStack
|
Item |
withAmount(int amount)
Returns new ItemStack of the same
Item with specified size |
components, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitsameTypegetReplacementspublic final ItemFactory getFactory()
ItemFactory that refers to this Block class.public final java.lang.String getID()
IdentifiablegetID in interface Identifiablepublic java.lang.String getUnlocalizedName()
TranslatablegetUnlocalizedName in interface Translatablepublic java.lang.String getLocalizedName()
TranslatablegetLocalizedName in interface Translatablepublic int getMaxCount()
public int count()
public Item setCount(int size)
size - New sizethis instancepublic int addCount(int size)
size - Size to addpublic Item clone()
clone in class java.lang.Objectpublic Item withAmount(int amount)
Item with specified sizeamount - Size of cloned ItemStackpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean sameItemType(Item item)
item id.item - The another Item@Deprecated public Color colorMultiplier()