public interface Item
Modifier and Type | Method and Description |
---|---|
int |
amount()
Returns the item amount.
|
Item |
copy()
Returns a copy of the item.
|
default short |
data()
Returns the item data.
|
int |
identifier()
Returns the item identifier.
|
default boolean |
isEmpty()
Returns true if the item is empty.
|
void |
setAmount(int amount)
Returns the item amount.
|
default 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.
|
int identifier()
void setIdentifier(int identifier)
identifier
- item identifierint amount()
void setAmount(int amount)
amount
- item amountdefault short data()
default void setData(short data)
data
- item datajava.lang.UnsupportedOperationException
- if the item implementation does not store data@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag()
void setTag(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag tag)
tag
- item tagStructuredDataContainer structuredData()
Item copy()
default boolean isEmpty()