Add Lightning Effect

Add Lightning Effect

Caution

The datapacks are only supported to versions superior or equal to 1.5.0

Creating the file

Lightning effect is the most “complicated” to implement. Before doing this, if you need more info on this feature see the Lightning Effects Mechanic. First you need to create a lightning_effect folder in your namespace folder. Then create a simple .json file like your creating a custom recipe.

The structure should looks like this:

    • pack.mcmeta
    • pack.png
          • example.json
  • The data format

    A Lightning Effect json file looks like this:

    data/example_datapack/lightning_effect/example.json
    {
      "effect": {
        "amplifier": 1,
        "duration": 480,
        "id": "<namespace>:<effect_id>",
        "show_icon": true
      },
      "item": "<namespace>:<armor_item_id>"
    }
    propertydescriptionoptional
    effectThe effect applied to the armor item.no
    itemThe target armor item to trigger the effect.no
    replaceIf you want to overide an already existing waxing transformation (use it with caution)yes

    If you want more details for the effect property, check this Minecraft Wiki page.

    Here’s an example of a lightning effect that apply an effect of Haste II form a Waxed Copper Chestplate.

    data/copper_extension/lightning_effect/waxed_copper_chestplate.json
    {
      "effect": {
        "amplifier": 1,
        "duration": 480,
        "id": "minecraft:haste",
        "show_icon": true
      },
      "item": "copper_extension:waxed_copper_chestplate"
    }