MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / damage

Method damage

src/main/java/com/volmit/adapt/util/Items.java:309–315  ·  view source on GitHub ↗

Damage an itemstack @param is the item @param amt the amount to damage

(ItemStack is, int amt)

Source from the content-addressed store, hash-verified

307 * @param amt the amount to damage
308 */
309 public static void damage(ItemStack is, int amt) {
310 if (!is(is)) {
311 return;
312 }
313
314 setDurability(is, getDurability(is) + amt);
315 }
316
317 /**
318 * Can the item a be stacked onto the item b (following max stack size)

Callers

nothing calls this directly

Calls 3

isMethod · 0.95
setDurabilityMethod · 0.95
getDurabilityMethod · 0.95

Tested by

no test coverage detected