Attempts to "damage" an item. 1. If the item is null, null is returned 2. If the item doesnt have durability, (damage) amount will be consumed from the stack, null will be returned if more consumed than amount 3. If the item has durability, the damage will be consuemd and return the item affected, O
(ItemStack item, int damage)
| 73 | * @return the damaged item or null if destroyed |
| 74 | */ |
| 75 | default ItemStack damage(ItemStack item, int damage) { |
| 76 | if (item == null) { |
| 77 | return null; |
| 78 | } |