Block
Represents a data-driven Block. MS Docs
Parameters
Name | Type | Description |
---|---|---|
identifier | Identifier | |
menu_category | MenuCategory | |
components | dict[str, BlockComponent] | |
events | dict[Identifier, Event] | |
traits | dict[Identifier, BlockTrait] | |
states | dict[Identifier, list[str]] | |
sound_group | str |
Methods
Example
py
from mcaddon import *
blk = Block('test:on_interact_change_state_block')
blk.add_component(OnInteractComponent(event='test_event'))
blk.add_event('test_event', SetBlockProperty({'custom:direction': "1"}))
blk.save('block.json')