public static class ItemDurabilityChangedCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private NumberRange.IntRange |
delta |
private NumberRange.IntRange |
durability |
private ItemPredicate |
item |
Constructor and Description |
---|
Conditions(ItemPredicate item,
NumberRange.IntRange durability,
NumberRange.IntRange delta) |
Modifier and Type | Method and Description |
---|---|
static ItemDurabilityChangedCriterion.Conditions |
create(ItemPredicate item,
NumberRange.IntRange durability) |
boolean |
matches(ItemStack stack,
int damage) |
JsonElement |
toJson() |
getId, toString
private final ItemPredicate item
private final NumberRange.IntRange durability
private final NumberRange.IntRange delta
public Conditions(ItemPredicate item, NumberRange.IntRange durability, NumberRange.IntRange delta)
public static ItemDurabilityChangedCriterion.Conditions create(ItemPredicate item, NumberRange.IntRange durability)
public boolean matches(ItemStack stack, int damage)
public JsonElement toJson()