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(EntityPredicate.Extended player,
ItemPredicate item,
NumberRange.IntRange durability,
NumberRange.IntRange delta) |
Modifier and Type | Method and Description |
---|---|
static ItemDurabilityChangedCriterion.Conditions |
create(EntityPredicate.Extended extended,
ItemPredicate itemPredicate,
NumberRange.IntRange intRange) |
boolean |
matches(ItemStack stack,
int damage) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final ItemPredicate item
private final NumberRange.IntRange durability
private final NumberRange.IntRange delta
public Conditions(EntityPredicate.Extended player, ItemPredicate item, NumberRange.IntRange durability, NumberRange.IntRange delta)
public static ItemDurabilityChangedCriterion.Conditions create(EntityPredicate.Extended extended, ItemPredicate itemPredicate, NumberRange.IntRange intRange)
public boolean matches(ItemStack stack, int damage)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions