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

Method getDurability

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

Get the durability @param is the item @return the item durability

(ItemStack is)

Source from the content-addressed store, hash-verified

265 * @return the item durability
266 */
267 public static short getDurability(ItemStack is) {
268 if (!is(is)) {
269 return 0;
270 }
271
272 return is.getDurability();
273 }
274
275 /**
276 * Set the durability (if higher than max, it will be set to the max)

Callers 7

isBrokenMethod · 0.95
getDurabilityPercentMethod · 0.95
setDurabilityPercentMethod · 0.95
damageMethod · 0.95
onMethod · 0.80
toDataMethod · 0.80
isMergableMethod · 0.80

Calls 1

isMethod · 0.95

Tested by

no test coverage detected