public interface ImmutableDurabilityData extends ImmutableDataManipulator<ImmutableDurabilityData,DurabilityData>
ImmutableDataManipulator
handling the "durability" of an
ItemStack
that will "break" after a certain amount of "uses".
Usually, items with durability will break and disappear when their
durability reaches the maximum. Examples of this include pickaxes,
axes, swords, and shovels. It is recommended to retrieve the maximum
durability limit from the UseLimitProperty
.
Modifier and Type | Method and Description |
---|---|
ImmutableBoundedValue<Integer> |
durability()
Gets the
ImmutableBoundedValue for the "durability" remaining. |
ImmutableValue<Boolean> |
unbreakable()
Gets the
ImmutableValue for the "unbreakable" state of the
ItemStack . |
asMutable, copy, with, with
getContentVersion, toContainer
ImmutableBoundedValue<Integer> durability()
ImmutableBoundedValue
for the "durability" remaining.
The durability is a number signifying how many "uses' remain on the
item. When the durability reaches 0, usually, the item breaks.ImmutableValue<Boolean> unbreakable()
ImmutableValue
for the "unbreakable" state of the
ItemStack
. While the ItemStack
is "unbreakable",
the durability can not change.