Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-272327

Attribute effects not properly postfixed with slot name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Future Update
    • 24w21a
    • None
    • Confirmed
    • Data Packs, Enchantments
    • Normal
    • Platform

      The changelog for the most recent snapshot states that an enchantment's attribute modifier id "will be postfixed with the slot name when the enchanted item is equipped in a slot". In practice, this only works for the "minecraft:attributes" effect component. Attempting to equip multiple items with a "minecraft:attribute" effect does not seem to properly do this, meaning the modifier does not stack when multiple pieces of armor are equipped with a custom enchant made in this way.

      Attached is a datapack with two enchantments for testing purposes. Both are the same enchantment, with the minor difference that one uses the "minecraft:attributes" effect component, while the other uses the "minecraft:attribute" effect inside a "minecraft:location_changed" effect component. Apply each enchantment to multiple pieces of armor, and observe that applying "Health Boost (Component)" stacks when worn on multiple pieces of armor, while applying "Health Boost (Effect)" applies the boost only once.

            slicedlime [Mojang] slicedlime
            Shock_Micro Shock Micro
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: