Constructor and Description |
---|
BaseItemStack(ItemType itemType)
Construct the object with default stack size of one, with damage value of 0.
|
BaseItemStack(ItemType id,
CompoundTag tag,
int amount)
Deprecated.
|
BaseItemStack(ItemType itemType,
int amount)
Construct the object.
|
BaseItemStack(ItemType id,
LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> tag,
int amount)
Construct the object.
|
Modifier and Type | Method and Description |
---|---|
int |
getAmount()
Get the number of items in the stack.
|
com.sk89q.worldedit.util.formatting.text.Component |
getRichName() |
void |
setAmount(int amount)
Set the amount of items in the stack.
|
getNbtReference, getType, setNbtReference, setType, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNbt, getNbtData, hasNbtData, setNbt, setNbtData
public BaseItemStack(ItemType itemType)
itemType
- The item typepublic BaseItemStack(ItemType itemType, int amount)
itemType
- The item typeamount
- amount in the stack@Deprecated public BaseItemStack(ItemType id, CompoundTag tag, int amount)
BaseItemStack(ItemType, LazyReference, int)
id
- The item typetag
- Tag valueamount
- amount in the stackpublic BaseItemStack(ItemType id, LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> tag, int amount)
id
- The item typetag
- Tag valueamount
- amount in the stackpublic int getAmount()
public void setAmount(int amount)
amount
- the amount to setpublic com.sk89q.worldedit.util.formatting.text.Component getRichName()