Class BaseItemStack

java.lang.Object
com.sk89q.worldedit.blocks.BaseItem
com.sk89q.worldedit.blocks.BaseItemStack
All Implemented Interfaces:
NbtValued

public class BaseItemStack extends BaseItem
Represents a stack of BaseItems.

This class may be removed in the future.

  • Constructor Details

    • BaseItemStack

      public BaseItemStack(ItemType itemType)
      Construct the object with default stack size of one, with damage value of 0.
      Parameters:
      itemType - The item type
    • BaseItemStack

      public BaseItemStack(ItemType itemType, int amount)
      Construct the object.
      Parameters:
      itemType - The item type
      amount - amount in the stack
    • BaseItemStack

      @Deprecated public BaseItemStack(ItemType id, CompoundTag tag, int amount)
      Construct the object.
      Parameters:
      id - The item type
      tag - Tag value
      amount - amount in the stack
    • BaseItemStack

      public BaseItemStack(ItemType id, LazyReference<org.enginehub.linbus.tree.LinCompoundTag> tag, int amount)
      Construct the object.
      Parameters:
      id - The item type
      tag - Tag value
      amount - amount in the stack
  • Method Details

    • getAmount

      public int getAmount()
      Get the number of items in the stack.
      Returns:
      the amount
    • setAmount

      public void setAmount(int amount)
      Set the amount of items in the stack.
      Parameters:
      amount - the amount to set
    • getRichName

      public com.sk89q.worldedit.util.formatting.text.Component getRichName()