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

Changing the durability of the Iron Axe with the set_damage item_modifier changes the durability to a value 1 too high. This happens for about 50% of the durability values. 

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.6
    • None
    • Windows 11 Home
      Version 23H2
    • Community Consensus
    • (Unassigned)

      Changing the durability of the Iron Axe with the set_damage item_modifier changes the durability to a value 1 too high. This happens for about 50% of the durability values. 

       

      To reproduce:

      Download the attached datapack

      Damage an Iron Axe, check the durability, it should be a value like 243/250.

      Calculate the percentage: 243/250=0.972

      Save the percentage into a data storage using the following command:

      /data modify storage minecraft:test percent set value [percentage of durability]f

      Run this command to trigger the item_modifier to test for the durability:

      /item modify entity @s weapon test:durability

       
      test is the data storage and percent the location where the percent value is being saved as a float.
       
      test is the datapack namespace and durability the name of the item_modifier file
       
      now the iron_axe should have a durabilty of 244/250
       
      This Bug only happens for about 50% of the durability values, but they always appear in clusters. So it's always a cluster of correct conversions than a cluster of wrong conversions.
       
      I have not found a single durabilty value for the other axes in the game where this bug also happens.
       
      I have not testet previous versions.

            Unassigned Unassigned
            Joja Joja
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: