mojira.dev
MC-151686

Equipment used by non-player entities doesn't consume durability

The Bug:

Tools and armor used by non-player entities don't consume durability.

This is too good for auto farms to be a feature. For example, you can use multiple foxes with swords to make giant farms.

Steps to Reproduce:

  1. Summon a fox holding a wooden sword with 1 durability on it by using the command provided below.

    /summon minecraft:fox ~ ~ ~ {HandItems:[{id:"minecraft:wooden_sword",Count:1b,tag:{Enchantments:[{id:"minecraft:fire_aspect",lvl:1}],Damage:58}}]}
  2. Summon a chicken near the fox and allow the fox to attack the chicken.

  3. Take note as to whether or not swords used by non-player entities consume durability.

Observed Behavior:

The sword can be used infinitely.

Expected Behavior:

The sword breaks.

Linked issues

Attachments

Comments 10

Can confirm in 20w51a.

Can confirm in 21w06a.

Can confirm in 1.16.5 and 21w08b.

Can confirm in 21w10a. Video attached.

This appears to affect all non-player entities and isn't just exclusive to foxes. I've updated this ticket accordingly.

This apso applies to armor, and anything in the hand (non-swords too); only helmets take damage if it's an undead mob in the sun.

Also crossbows held by pillagers and piglins take damage when used. (MC-163960)

Whoops, forgot about them, but yes, only helmets and crossbows.

Can confirm in 1.17

Confirmed for 1.20.1; this report should really be extended to all melee tools/weapons at the least, as swords are far from the only thing affected.
Whether bows (for skeletons and illusioner) and armor should be included, or get their own report is devatable.

Alex Ivanov

(Unassigned)

Confirmed

Entities

fox

Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.1 Pre-Release 2, 1.14.4, 20w51a, ..., 1.19.2, 1.19.3 Pre-release 2, 1.19.4, 1.20 Pre-release 1, 1.20.1

Retrieved