Class StructuredItem

java.lang.Object
com.viaversion.viaversion.api.minecraft.item.StructuredItem
All Implemented Interfaces:
Item

public class StructuredItem extends Object implements Item
  • Constructor Details

    • StructuredItem

      public StructuredItem(int identifier, int amount)
    • StructuredItem

      public StructuredItem(int identifier, int amount, StructuredDataContainer data)
  • Method Details

    • empty

      public static StructuredItem empty()
    • emptyArray

      public static Item[] emptyArray(int size)
    • identifier

      public int identifier()
      Description copied from interface: Item
      Returns the item identifier.
      Specified by:
      identifier in interface Item
      Returns:
      item identifier
    • setIdentifier

      public void setIdentifier(int identifier)
      Description copied from interface: Item
      Sets the item identifier.
      Specified by:
      setIdentifier in interface Item
      Parameters:
      identifier - item identifier
    • amount

      public int amount()
      Description copied from interface: Item
      Returns the item amount.
      Specified by:
      amount in interface Item
      Returns:
      item amount
    • setAmount

      public void setAmount(int amount)
      Description copied from interface: Item
      Returns the item amount.
      Specified by:
      setAmount in interface Item
      Parameters:
      amount - item amount
    • tag

      public @Nullable com.viaversion.nbt.tag.CompoundTag tag()
      Description copied from interface: Item
      Returns the item compound tag if present.
      Specified by:
      tag in interface Item
      Returns:
      item tag
    • setTag

      public void setTag(@Nullable com.viaversion.nbt.tag.CompoundTag tag)
      Description copied from interface: Item
      Sets the item compound tag.
      Specified by:
      setTag in interface Item
      Parameters:
      tag - item tag
    • dataContainer

      public StructuredDataContainer dataContainer()
      Description copied from interface: Item
      Returns the data container for item data components.
      Specified by:
      dataContainer in interface Item
      Returns:
      the data container
    • copy

      public StructuredItem copy()
      Description copied from interface: Item
      Returns a copy of the item.
      Specified by:
      copy in interface Item
      Returns:
      copy of the item
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object