mojira.dev
MC-276041

Protection-like enchantments can only be made all compatible or none, with datapacks

In regular gameplay, all four of the Protection enchantments are incompatible with each other. But as of 1.21, with datapacks it is possible to edit exclusivity by way of the exclusive_set folder within tags.

However, it seems to only respect an all or none situation when editing the original exclusive_set/armor.json.

Steps to Reproduce:

  1. Load into world with protections_all datapack loaded in. (This datapack simply removes the exclusive_set fields from the four Protection enchantments)

  2. Gather four chestplates each with only a single different Protection enchant.

  3. Attempt to place them into an anvil, and observe the output. At this stage they can all be combined just fine, potentially allowing all 4 enchantments on one armor piece.

  4. Save and exit out of the world, and replace the protections_all datapack with the special_protections_test datapack (this one removes the exclusive set from just the Protection enchantment and also edits the exclusive_set/armor to only have Fire/Blast/Projectile Protections be incompatible with each other)

  5. Attempt to place one chestplate with Protection and another chestplate with a specialized Protection (Fire/Blast/Projectile) together in the anvil slots, and observe any preview output.

Expected Result:

Chestplates can combine into a chestplate with Protection and one specialized Protection.

Actual Result:

Chestplates cannot combine despite the Protection enchantment json and the exclusive_set/armor tag being changed to allow Protection and one specialized Protection.

Attachments

Comments 3

Edit: Removed erroneous photo, now has the correct screenshot attached, showing the bugged output.

You forgot the replace flag in data\minecraft\tags\enchantment\exclusive_set\armor.json in

[media]

. Adding it makes the pack behave as expected:

{
  "replace": true,
  "values": [
    "minecraft:blast_protection",
    "minecraft:fire_protection",
    "minecraft:projectile_protection"
  ]
}

miziragamez

(Unassigned)

Unconfirmed

(Unassigned)

1.21.1

Retrieved