MCPcopy Index your code
hub / github.com/VolmitSoftware/Adapt / damage

Method damage

src/main/java/com/volmit/adapt/api/Component.java:75–75  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 }

Callers 7

onMethod · 0.65
onRunMethod · 0.65
onMethod · 0.65
onMethod · 0.65
triggerSeekerMethod · 0.65
onMethod · 0.65
punchMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected