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