Defining Amplifying Seals In JSON

Amplifying Seals are defined in JSON files. Let's define a seal named broader_blade. This seal will increase the aoe, aoe damage, aoe max mobs, and damage of the sweeping_blade seal that was defined in the Previous Tutorial. It will also remove the use function and add one that lights furnaces and makes coal ore into diamond ore.

{
  "id": "broader_blade",
  "type": "amplifying"
}

This is the JSON file defining our new broader_blade seal. We put it in data/<namespace>/seals/<path>.json.

These are just the basic fields that are mandatory for every seal. id has to be the name of your seal, all lowercase, with an underscore instead of space. type can only be offensive, passive, or amplifying. For a tutorial on offensive or passive seals, see Non-Amplifying Seals

Texture

This seal has no texture. To add one, you simply add a field to the seal JSON.

{
  "texture": "<namespace>:item/seals/sweeping_blade_seal"
}

The field texture is the texture in your inventory. Unlike the other seals, which can be activated, amplifying seals are unactivatable, therefore, they do not need an activeTexture.

Requirements

Amplifying seals can be created so that the wand imbuing station will not be able to add this seal unless the requirement is present. For this tutorial seal, we will add the Sweeping Blade Seal as a requirement. Though it is not recommended, multiple requirements can be added by turning the requirements into an array. Adding the following to our JSON file will make it so that the sweeping_blade seal is a requirement:

{
  "requirement": "sweeping_blade"
}

Priority

Priority is important if there are conflicting amplifications on seals. The higher priority always takes effect. For example if one seal had silk touch and a priority of four, while another seal had fortune with a priority of nine, fortune would take effect. Priority also determines in which order seals are loaded, the highest being the last (so it overrides other modifications). To define priority, you need to add a field to the top of your seal JSON. This int is priority. As an example, the following JSON will give the seal a priority of nine.

{
  "priority": 9
}

Multiple Seals

Amplifying seals are different from normal seals because multiple can be added on at once. Depending on the seal, this may strengthen the effects (if defined in JSON). To add multiple seals, you need to add a stacking object to your JSON.

This JSON will make the seal stack up to an infinite number:

{
  "stacking": {
    "doesStack": true
  }
}

Limiting Max Seal Stack Count

From the previous step, you may have noticed that we did not limit the stack size. All you need to do is to add the int maxStackCount to the stacking object.

{
  "stacking": {
    "doesStack": true,
    "maxStackCount": 5
  }
}

This addition makes it so the seal only stacks up to five.

Global Variables

Global variables are important to interact properly with stacking.

These are strings that will be replaced by ints during parsing depending on the actual value. All of the built-in ones are:

  • Global Variables for stacks
    • stack_count; how many of this seal are currently stacked
    • stack_count(<seal>) returns how many seals of type <seal> there are. <seal> is an id
    • max_stack_count(<seal>) max amount of seals of type <seal> that can be stacked. is Integer.MAX_VALUE if the seal can hold infinite.
    • damage_without_amplifications(<seal>) returns the base damage of seal of type <seal>

Actions can be done to these. simply put + for addition,* for multiplication,/ for division, - for subtraction, or ^ for exponential. Then put a number, and it will return the result of the action done to the variable (if I there were four seals on a wand and I did "stack_count + 5", it would return nine)

Amplifying Other Seals

Amplifying seals is a complex topic that requires in-depth knowledge about seals. To start amplifying seals, a changeFunctions array needs to be added to the seal JSON. This is where ALL change functions will be located.

Each change function will contain at least two fields. seal is the seal to amplify and type is the action to do to the seal.

For every type, there is an object, function that will contain all of the fields pertaining to type

There are loads of actions that can be done to a seal. I will list them here:

  • Damage Actions

    • increase_damage; increases damage
      • AOE Actions

        • increase_damage.aoe; increases only aoe damage multiplier
        • increase_damage.aoe.max_mobs; increases aoe max mob count
        • increase_damage.aoe.range; increases aoe range
  • Use Function Actions

    • remove_use_function; removes all use function
    • remove_use_function[<index>]; removes the use function at (index starts at zero)
    • remove_use_function(<id>); removes the use function with the id of
    • add_use_function; adds a use function
  • Mining Actions

    • mining.mining_speed; increases mining speed
    • mining.add_mining_block; add mineable blocks
    • mining.remove_mining_block; remove mineable blocks
    • mining.set_mining_level; sets mining level
    • mining.vein_mine; adds vein mine (cannot be used on the same seal as area_mine. If another seal with Area Mine is on the wand, the seal with higher priority will give the amplifying action)
    • mining.area_mine; makes all blocks of equal or lesser hardness than the block mined withing an area break. (cannot be used on the same seal as vein_mine. If another seal with Vein Mine is on the wand, the seal with higher priority will give the amplifying action)
    • mining.fortune; adds fortune levels (cannot be used on the same seal as silk_touch. If another seal with Silk Touch is on the wand, the seal with higher priority will give the amplifying action)
    • mining.silk_touch; adds silk touch levels (cannot be used on the same seal as fortune. If another seal with fortune is on the wand, the seal with higher priority will give the amplifying action)
  • Miscellaneous Actions

    • lock; no more seals can be added to the wand

Damage Actions

For all the damage actions (defined above), all the fields can be the same, except for type. The type field has to be the action you are doing.

For these actions, there is an optional field called toAMaxOf, which will add a cap to the amount of what it is modifying. This is an int.

For example, this code will multiply damage by five.

{
  "changeFunctions": [
    {
      "seal": "sweeping_blade",
      "type": "increase_damage",
      "function": {
        "action": "multiply",
        "amount": 5
      }
    }
  ]
}

Remove Use Function Action

There are two actions for removing use functions, remove_use_function, remove_use_function[<index>], and remove_use_function(<id>). Remove use function with no arguments will remove the first use function. Remove use function with square brackets and an int will remove the use function at that index (index starts at zero, so the second function will be the first and so on). Remove use function with parentheses and a string will remove the use function of that id. The following code removes the use function called "axe_to_stone".

{
  "changeFunctions": [
    {
      "seal": "sweeping_blade",
      "type": "remove_use_function(axe_to_stone)"
    }
  ]
}

Add Use Function Action

The add use function can add a use function. The use function will have the same format as that of a non-amplifying seal. The following JSON will add a custom use function that turns coal into diamonds and has the id high_pressure if the player is standing on a redstone block

{
  "function": {
    "id": "high_pressure",
    "action": "change_block",
    "updateBlock": {
      "block": "minecraft:coal_ore",
      "result": "minecraft:diamond_ore"
    },
    "conditions": [
      {
        "type": "is_block_looking_at",
        "pos": [0, -1, 0],
        "block": "minecraft:redstone_block"
      }
    ]
  }
}