Constructor and Description |
---|
DataItem() |
DataItem(int identifier,
byte amount,
short data,
@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag) |
DataItem(Item toCopy) |
Modifier and Type | Method and Description |
---|---|
int |
amount()
Returns the item amount.
|
Item |
copy()
Returns a copy of the item.
|
short |
data()
Returns the item data.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
int |
identifier()
Returns the item identifier.
|
void |
setAmount(int amount)
Returns the item amount.
|
void |
setData(short data)
Sets the item data used in versions before 1.13.
|
void |
setIdentifier(int identifier)
Sets the item identifier.
|
void |
setTag(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag)
Sets the item compound tag.
|
StructuredDataContainer |
structuredData() |
@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag |
tag()
Returns the item compound tag if present.
|
java.lang.String |
toString() |
public DataItem()
public DataItem(int identifier, byte amount, short data, @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag)
public DataItem(Item toCopy)
public int identifier()
Item
identifier
in interface Item
public void setIdentifier(int identifier)
Item
setIdentifier
in interface Item
identifier
- item identifierpublic int amount()
Item
public void setAmount(int amount)
Item
public short data()
Item
public void setData(short data)
Item
public @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag()
Item
public void setTag(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag)
Item
public StructuredDataContainer structuredData()
structuredData
in interface Item
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object