Item
Represents a data-driven Item. MS Docs
Parameters
Name | Type | Description |
---|---|---|
identifier | Identifier | |
menu_category | MenuCategory | |
components | dict[Identifier, ItemComponent] | |
events | dict[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')