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) 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
getNbtData, getType, hasNbtData, setNbtData, setType
-
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
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()
-