Skip to main content

Items

Create Item Stack​

item_type.create_item_stack

Constructs a new itemstack with this item type that has the amount 1.

InTypeWhat it is
Item TypeItem TypeRepresents an item type.
OutTypeWhat it is
ResultItemthe constructed item stack.

Mutate Item​

item.mutate

Changes the properties of a Item that are given, the others stay as they are, and gives every property's value after the change

InTypeWhat it is
ItemItemRepresents a stack of items.
Amount (optional)IntegerSets the amount of items in this stack
OutTypeWhat it is
AmountIntegerGets the amount of items in this stack
EmptyBooleanReturns whether this item stack is empty and contains no item.
Item FlagsSet<ItemFlag>Get current set itemFlags.
Max Stack SizeIntegerGet the maximum stack size for this item.
TypeMaterialGets the type of this item

Goes on with: Next

Read Item​

item.read

Reads the properties of a Item

InTypeWhat it is
ItemItemRepresents a stack of items.
OutTypeWhat it is
AmountIntegerGets the amount of items in this stack
EmptyBooleanReturns whether this item stack is empty and contains no item.
Item FlagsSet<ItemFlag>Get current set itemFlags.
Max Stack SizeIntegerGet the maximum stack size for this item.
TypeMaterialGets the type of this item

Read Item Type​

item_type.read

Reads the properties of a Item Type

InTypeWhat it is
Item TypeItem TypeRepresents an item type.
OutTypeWhat it is
Block TypeBlock TypeReturns the corresponding BlockType for the given ItemType.
Burn DurationIntegerRetrieve the item's burn duration in a Furnace
Compost ChanceFloatGet the chance that this item type will successfully compost.
CompostableBooleanChecks whether this item type is compostable (can be inserted into a composter).
Crafting Remaining ItemItem TypeDetermines the remaining item in a crafting grid after crafting with this ingredient.
EdibleBooleanChecks if this item type provides the FOOD and CONSUMABLE and, thereby, is edible by a player.
FuelBooleanChecks if this item type can be used as fuel in a Furnace
Item RarityItemRarityReturns the item rarity for the item.
Max DurabilityshortGets the maximum durability of this item type
Max Stack SizeIntegerGets the maximum amount of this item type that can be held in a stack
RecordBooleanTrue if this item type represents a playable music disk.