ItemStack

A proxy for an item stack from Minecraft

ItemStack.getName

Gets the name of the item
overload 1:
ItemStack:getName()
Method Property Fluent Description Representation
Return Value a String

ItemStack.copy

Returns a copy of this item stack
overload 1:
ItemStack:copy()
Method Property Fluent Description Representation
Return Value an ItemStack

ItemStack.getCount

Gets the number of items in this stack
overload 1:
ItemStack:getCount()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.getTag

Gets a table of the NBT tags of this stack
overload 1:
ItemStack:getTag()
Method Property Fluent Description Representation
Return Value a table

ItemStack.getID

Gets the ID of this stack
overload 1:
ItemStack:getID()
Method Property Fluent Description Representation
Return Value a String

ItemStack.getTags

Gets all the tags of this item as strings in a table
overload 1:
ItemStack:getTags()
Method Property Fluent Description Representation
Return Value a table

ItemStack.getMaxCount

Gets the maximum stack size of this item
overload 1:
ItemStack:getMaxCount()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.getUseDuration

Gets the number of ticks needed to "use" this item
Currently only has a use for food items
Always 32 for food items except kelp,
which is 16
overload 1:
ItemStack:getUseDuration()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.toStackString

Converts this ItemStack to a string, as you'd see in a command
overload 1:
ItemStack:toStackString()
Method Property Fluent Description Representation
Return Value a String

ItemStack.getUseAction

Returns the name of the animation that plays when using this item
overload 1:
ItemStack:getUseAction()
Method Property Fluent Description Representation
Return Value a String

ItemStack.isArmor

Checks if this item is Armor
overload 1:
ItemStack:isArmor()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.getDamage

Gets the damage value of the item in this stack
Works on things like tools,
or other things with a durability bar
overload 1:
ItemStack:getDamage()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.isBlockItem

Returns true if this item represents a block
overload 1:
ItemStack:isBlockItem()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.hasGlint

Returns true if this item glows with enchantment glint
overload 1:
ItemStack:hasGlint()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.getRarity

Gets the rarity of this item stack
COMMON = white, UNCOMMON = yellow,
RARE = aqua, EPIC = light purple
overload 1:
ItemStack:getRarity()
Method Property Fluent Description Representation
Return Value a String

ItemStack.isEnchantable

Returns true if this item stack can be put in an enchanting table
overload 1:
ItemStack:isEnchantable()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.getMaxDamage

Gets the maximum durability of this item stack
overload 1:
ItemStack:getMaxDamage()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.isDamageable

Returns true if this item stack has durability
overload 1:
ItemStack:isDamageable()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.getRepairCost

Gets the repair cost modifier, in an anvil, for this item stack
overload 1:
ItemStack:getRepairCost()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.getPopTime

Gets the item's animation bobbing time, in ticks. This value is used to move an item to the player when it is picked up
overload 1:
ItemStack:getPopTime()
Method Property Fluent Description Representation
Return Value an Integer

ItemStack.isFood

Returns true if this item is edible
overload 1:
ItemStack:isFood()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.isStackable

Returns true if the item is stackable
overload 1:
ItemStack:isStackable()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.getEquipmentSlot

Returns the slot name of where this item is used
overload 1:
ItemStack:getEquipmentSlot()
Method Property Fluent Description Representation
Return Value a String

ItemStack.isTool

Check if this item is a Tool (Axe, Shovel, Pickaxe, …)
overload 1:
ItemStack:isTool()
Method Property Fluent Description Representation
Return Value a Boolean

ItemStack.getBlockstate

Returns the blockstate representation of this item stack
If this item has no block representation,
returns nil
overload 1:
ItemStack:getBlockstate()
Method Property Fluent Description Representation
Return Value a BlockState

ItemStack.id

Contains the id of the item this ItemStack refers to
field signature:
id
Method Property Fluent Description Representation
Field Type a String

ItemStack.tag

A table containing the NBT tag of this ItemStack
If this ItemStack has nothing in its tag,
it is nil
field signature:
tag
Method Property Fluent Description Representation
Field Type a table
a a