Skip to content

Item

Represents a data-driven Item. MS Docs

Parameters

NameTypeDescription
identifierIdentifier
menu_categoryMenuCategory
componentsdict[Identifier, ItemComponent]
eventsdict[Identifier, Event]

Methods

Example

py
from mcaddon import *

blk = Item('minecraft:blaze_rod')
blk.add_component(FuelComponent(12.0))
blk.add_component(MaxStackSizeComponent(64))
blk.add_component(IconComponent('blaze_rod'))
blk.add_component(HandEquippedComponent(True))
blk.add_component(DisplayNameComponent('Blaze Rod'))
blk.save('item.json')

Not associated with or approved by Mojang Studios or Microsoft