Buy Me a Coffee at ko-fi.com

A proxy for an item stack from Minecraft

Returns a copy of this item stack

overload 1:
ItemStack.copy(): ItemStack
typings.-148280555
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the blockstate representation of this item stack
If this item has no block representation, returns nil

overload 1:
ItemStack.getBlockstate(): BlockState
typings.-1026048988
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the number of items in this stack

overload 1:
ItemStack.getCount(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

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(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the slot name of where this item is used

overload 1:
ItemStack.getEquipmentSlot(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the ID of this stack

overload 1:
ItemStack.getID(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the maximum stack size of this item

overload 1:
ItemStack.getMaxCount(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the maximum durability of this item stack

overload 1:
ItemStack.getMaxDamage(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the name of the item

overload 1:
ItemStack.getName(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

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(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the rarity of this item stack
COMMON = white, UNCOMMON = yellow, RARE = aqua, EPIC = light purple

overload 1:
ItemStack.getRarity(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the repair cost modifier, in an anvil, for this item stack

overload 1:
ItemStack.getRepairCost(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets a table of the NBT tags of this stack

overload 1:
ItemStack.getTag(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Gets all the tags of this item as strings in a table

overload 1:
ItemStack.getTags(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the name of the animation that plays when using this item

overload 1:
ItemStack.getUseAction(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

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(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this item glows with enchantment glint

overload 1:
ItemStack.hasGlint(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if this item is Armor

overload 1:
ItemStack.isArmor(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this item represents a block

overload 1:
ItemStack.isBlockItem(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this item stack has durability

overload 1:
ItemStack.isDamageable(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this item stack can be put in an enchanting table

overload 1:
ItemStack.isEnchantable(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this item is edible

overload 1:
ItemStack.isFood(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if the item is stackable

overload 1:
ItemStack.isStackable(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Check if this item is a Tool (Axe, Shovel, Pickaxe, …)

overload 1:
ItemStack.isTool(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Converts this ItemStack to a string, as you'd see in a command

overload 1:
ItemStack.toStackString(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Contains the id of the item this ItemStack refers to

field signature:
ItemStack.id: String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Field Type

A table containing the NBT tag of this ItemStack
If this ItemStack has nothing in its tag, it is nil

field signature:
ItemStack.tag: Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Field Type