Class StructuredItem
java.lang.Object
com.viaversion.viaversion.api.minecraft.item.StructuredItem
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredItem(int identifier, int amount) StructuredItem(int identifier, int amount, StructuredDataContainer data) -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the item amount.copy()Returns a copy of the item.Returns the data container for item data components.static StructuredItemempty()static Item[]emptyArray(int size) booleaninthashCode()intReturns the item identifier.voidsetAmount(int amount) Returns the item amount.voidsetIdentifier(int identifier) Sets the item identifier.voidsetTag(@Nullable com.viaversion.nbt.tag.CompoundTag tag) Sets the item compound tag.@Nullable com.viaversion.nbt.tag.CompoundTagtag()Returns the item compound tag if present.toString()
-
Constructor Details
-
StructuredItem
public StructuredItem(int identifier, int amount) -
StructuredItem
-
-
Method Details
-
empty
-
emptyArray
-
identifier
public int identifier()Description copied from interface:ItemBaseReturns the item identifier.- Specified by:
identifierin interfaceItemBase- Returns:
- item identifier
-
setIdentifier
public void setIdentifier(int identifier) Description copied from interface:ItemBaseSets the item identifier.- Specified by:
setIdentifierin interfaceItemBase- Parameters:
identifier- item identifier
-
amount
public int amount()Description copied from interface:ItemBaseReturns the item amount. -
setAmount
public void setAmount(int amount) Description copied from interface:ItemBaseReturns the item amount. -
tag
public @Nullable com.viaversion.nbt.tag.CompoundTag tag()Description copied from interface:ItemReturns the item compound tag if present. -
setTag
public void setTag(@Nullable com.viaversion.nbt.tag.CompoundTag tag) Description copied from interface:ItemSets the item compound tag. -
dataContainer
Description copied from interface:ItemReturns the data container for item data components.- Specified by:
dataContainerin interfaceItem- Returns:
- the data container
-
copy
Description copied from interface:ItemReturns a copy of the item. -
equals
-
hashCode
public int hashCode() -
toString
-