public static class EnchantedItemCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private ItemPredicate |
item |
private NumberRange.IntRange |
levels |
Constructor and Description |
---|
Conditions(EntityPredicate.Extended player,
ItemPredicate item,
NumberRange.IntRange levels) |
Modifier and Type | Method and Description |
---|---|
static EnchantedItemCriterion.Conditions |
any() |
boolean |
matches(ItemStack stack,
int levels) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final ItemPredicate item
private final NumberRange.IntRange levels
public Conditions(EntityPredicate.Extended player, ItemPredicate item, NumberRange.IntRange levels)
public static EnchantedItemCriterion.Conditions any()
public boolean matches(ItemStack stack, int levels)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions