When a crafting recipe uses set_data on an item with durability, it sets the legacy damage value rather than the proper damage value. This causes the tool to appear to have full durability until it is fixed with a relog.
- Download and open the attached world.
- Use the dirt in your inventory to craft a diamond sword
- Close and reopen the world
Sword is damaged immediately after being crafted or sword is never damaged
Sword is not damaged until after the relog