Mojira Archive
MC-271081

"minecraft:set_damage" on an item with the "minecraft:max_damage" component works strangely

When an item is created with the proper components (as per MC-269654) the "minecraft:set_damage" modifier function and "add": true causes strange effects

How to Reproduce:

  1. Create an item likeĀ /give @s minecraft:iron_axe[minecraft:damage=0,minecraft:max_damage=20]
  2. Run /item modify entity @s weapon.mainhand {"function": "minecraft:set_damage","damage": -1,"add": true} and see that it instantly sets damage to max damage.
  3. Run /item modify entity @s weapon.mainhand {"function": "minecraft:set_damage","damage": 1,"add": true} and see that it suddenly resets damage entirely.

Invalid

Immodial

2024-04-24, 02:54 AM

2024-04-24, 03:11 AM

2024-04-24, 03:11 AM

0

1

Unconfirmed

(Unassigned)

1.20.5

-