Mojira Archive
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. 

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.

Unresolved

Joja

2024-05-12, 11:04 PM

2024-07-18, 07:23 AM

1

2

Community Consensus

Low

Platform

Data Packs

1.20.6

-