mojira.dev
MC-278283

damage_on_hurt is working wrong

What I expected:
Since the item has the specified minecraft:max_damage component, it would break if the entity it was worn on took damage
What happened:
The item is not damaged when the entity is wounded

Steps to reproduce:

  1. Give an item that has no durability by default with the minecraft:max_damage and minecraft:equippable components:

    /give @s minecraft:diamond[minecraft:equippable={slot:feet,damage_on_hurt:1b},minecraft:max_damage=91,minecraft:max_stack_size=1]
  2. Equip this item

  3. Get damaged several times

Linked issues

Attachments

Comments 2

Adding 'minecraft:damage=0' to the item allows it to take damage:

/give @s minecraft:diamond[minecraft:equippable={slot:feet,damage_on_hurt:1b},minecraft:max_damage=91,minecraft:max_stack_size=1,minecraft:damage=0]
[media]

Thank you for your report!
We're tracking this issue in MC-269654, so this ticket is being resolved and linked as a duplicate.

That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

JustJabka

(Unassigned)

Unconfirmed

(Unassigned)

24w45a

Retrieved