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

damage_item does not repair items when the value is negative

XMLWordPrintable

    • Confirmed
    • Data Packs, Enchantments
    • Important
    • Platform

      Starting from 1.21, it was possible to make enchantments that repaired the enchanted item using a negative value for the damage_item component. However, as of 24w33a and up to the most recent snapshot 24w37a, this is no longer possible.

      Steps to Reproduce:

      1. Get the following item:
        /give @p minecraft:netherite_chestplate[minecraft:damage=591]
        
      2. Enchant it with the following command:
        /enchant @p testing:repair_damage_negative_test
        
      3. Hold the damaged item in your mainhand

      Expected Result:
      The item continues to have one durability point repaired every 20 ticks, like before.

      Actual Result:
      The item is not repairing itself over time, it remains at it's current durability amount.

        1. image-2024-09-18-20-23-28-123.png
          9 kB
          MNight_4

            slicedlime [Mojang] slicedlime
            miziragamez miziragamez
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: