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.getCount

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

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.isBlockItem

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

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.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.isDamageable

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

ItemStack.getCooldown

figura.docs.itemstack.get_cooldown
overload 1:
ItemStack:getCooldown()
Method Property Fluent Description Representation
Return Value an Integer

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.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.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.getMaxDamage

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

ItemStack.getMaxCount

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

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.isFood

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

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.isStackable

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

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