Class TradeTrigger.TriggerInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
net.minecraft.advancements.critereon.TradeTrigger.TriggerInstance
- All Implemented Interfaces:
SimpleCriterionTrigger.SimpleInstance
,CriterionTriggerInstance
- Enclosing class:
- TradeTrigger
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional<ItemPredicate>
private final Optional<ContextAwarePredicate>
-
Constructor Summary
ConstructorDescriptionTriggerInstance
(Optional<ContextAwarePredicate> p_300551_, Optional<ContextAwarePredicate> p_298281_, Optional<ItemPredicate> p_297475_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(LootContext p_70985_, ItemStack p_70986_) com.google.gson.JsonObject
tradedWithVillager
(EntityPredicate.Builder p_191437_) Methods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
playerPredicate
-
Field Details
-
villager
-
item
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(Optional<ContextAwarePredicate> p_300551_, Optional<ContextAwarePredicate> p_298281_, Optional<ItemPredicate> p_297475_)
-
-
Method Details
-
tradedWithVillager
-
tradedWithVillager
public static Criterion<TradeTrigger.TriggerInstance> tradedWithVillager(EntityPredicate.Builder p_191437_) -
matches
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJson
in interfaceCriterionTriggerInstance
- Overrides:
serializeToJson
in classAbstractCriterionTriggerInstance
-