MutableItemStack
Link to mutableitemstack
A Mutable Item Stack is a special IItemStack object that can only be retrieved from ICTPlayers.
That means all of IItemStack's methods, and those of IIngredients!
导入相关包
Link to 导入相关包
It might be required for you to import the package if you encounter any issues, so better be safe than sorry and add the import.
import mods.contenttweaker.MutableItemStack;
ZenMethods
Link to zenmethods
Quantity
Link to quantity
A Stack's count is the number of items in that stack!
ZenMethod | 参数类型 | 描述 |
---|---|---|
ZenMethod setCount(count) | 参数类型 int | 描述 Sets the stack's count to the count provided |
ZenMethod grow(count) | 参数类型 int | 描述 Increases the stack's count by the count provided |
ZenMethod shrink(count) | 参数类型 int | 描述 Decreases the stack's count by the count provided |
Damage
Link to damage
damage(int amount, ICTPlayer player)
Parameters:
- int amount → The amount of Damage points to give the item
- ICTPlayer player → the player/Entity damaging the item