Package com.sk89q.worldedit.blocks
Class BaseItemStack
java.lang.Object
com.sk89q.worldedit.blocks.BaseItem
com.sk89q.worldedit.blocks.BaseItemStack
- All Implemented Interfaces:
NbtValued
Represents a stack of BaseItems.
This class may be removed in the future.
-
Constructor Summary
ConstructorDescriptionBaseItemStack
(ItemType itemType) Construct the object with default stack size of one, with damage value of 0.BaseItemStack
(ItemType itemType, int amount) Construct the object.BaseItemStack
(ItemType id, CompoundTag tag, int amount) Deprecated.BaseItemStack
(ItemType id, LazyReference<org.enginehub.linbus.tree.LinCompoundTag> tag, int amount) Construct the object. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of items in the stack.com.sk89q.worldedit.util.formatting.text.Component
void
setAmount
(int amount) Set the amount of items in the stack.Methods inherited from class com.sk89q.worldedit.blocks.BaseItem
getNativeItem, getNbtReference, getType, setNbtReference, setType, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.world.NbtValued
getNbt, getNbtData, hasNbtData, setNbt, setNbtData
-
Constructor Details
-
BaseItemStack
Construct the object with default stack size of one, with damage value of 0.- Parameters:
itemType
- The item type
-
BaseItemStack
Construct the object.- Parameters:
itemType
- The item typeamount
- amount in the stack
-
BaseItemStack
Deprecated.Construct the object.- Parameters:
id
- The item typetag
- Tag valueamount
- 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 typetag
- Tag valueamount
- 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()
-
BaseItemStack(ItemType, LazyReference, int)