public static class InventoryChangedCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private NumberRange.IntRange |
empty |
private NumberRange.IntRange |
full |
private ItemPredicate[] |
items |
private NumberRange.IntRange |
occupied |
Constructor and Description |
---|
Conditions(EntityPredicate.Extended player,
NumberRange.IntRange occupied,
NumberRange.IntRange full,
NumberRange.IntRange empty,
ItemPredicate[] items) |
Modifier and Type | Method and Description |
---|---|
static InventoryChangedCriterion.Conditions |
items(ItemConvertible[] items) |
static InventoryChangedCriterion.Conditions |
items(ItemPredicate[] items) |
boolean |
matches(PlayerInventory inventory,
ItemStack stack,
int full,
int empty,
int occupied) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final NumberRange.IntRange occupied
private final NumberRange.IntRange full
private final NumberRange.IntRange empty
private final ItemPredicate[] items
public Conditions(EntityPredicate.Extended player, NumberRange.IntRange occupied, NumberRange.IntRange full, NumberRange.IntRange empty, ItemPredicate[] items)
public static InventoryChangedCriterion.Conditions items(ItemPredicate[] items)
public static InventoryChangedCriterion.Conditions items(ItemConvertible[] items)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions
public boolean matches(PlayerInventory inventory, ItemStack stack, int full, int empty, int occupied)