Mojira Archive
MC-4732

Tools and weapons lose durability when attacking players that are in creative

This bug shares the same problem with MC-525, but I am reporting this because it does not only affects Pvp.
Swords and tools lose durability without dealing any damage when used to hit mobs.
This happens when:
-Any mob is hit while in its invulnerable state (mob's model is red).
-Any dying mob (0 hp and have their model turned sideway) is hit. Their invisible hitbox still take the durability of your weapon.
-An Enderman is hit and teleports without taking damage.

To reproduce, try spamming hits on a few zombies with a wooden sword. The sword would break on the third or fourth zombie you use.
Another way to reproduce this is to fight an Enderman, a fresh sword for every hit. You may notice it teleporting without taking damage.

Weapons and tools should only loses durability in combat when they deal damage. For example a wooden sword with 60 uses SHOULD deal damage 60 times, not having half of them going to waste. This may not be a bug, but it is certainly a major annoyance.