Creating Addons
Last updated
Last updated
To create a Lucky Block Addon, you must first create a new folder. Copy the following folder structure:
The lucky_block.json file in the root of your datapack (in the namespace directory) defines the actual addon. The outcomes folder defines various drops (see Outcomes). Everything else is either vanilla assets or data.
A Lucky Block Addon can then be put inside of the "addons" folder in your game's run directory (typically .minecraft) to load it in game.
To see an example Datapack Lucky Block Addon, see the following:
The only required field is the "id" field. This defines the id of your lucky block addon, block, and item.
Activations determine how a Lucky Block is "opened" or "activated". This field is optional, and defaults to ["break_survival", "power"].
break_survival: lucky block activates when broken in survival
break_creative: lucky block activates when broken in creative
power: lucky block activates when powered by Redstone
right_click: lucky block activates when right-clicked
An optional field which determines whether the Lucky Block can be opened with a right-click. True by default.
An optional field which defines block & item settings.
Defines the block hardness. See below for more information.
Defines the block blast resistance. See below for more information.
Defines the item rarity. See below for more information.
An optional field which defines values for luck crafting. Maps item ids to an integer value between -100 and 100.
Defaults to false, this field should be used when testing Lucky Blocks. When true, it will print messages in the console:
Outcome Id when activating a block
Outcome Ids when loading outcomes on world load
Lucky Block Ids during initial game load