Class PlayerInteractTrigger.TriggerInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
net.minecraft.advancements.critereon.PlayerInteractTrigger.TriggerInstance
- All Implemented Interfaces:
SimpleCriterionTrigger.SimpleInstance
,CriterionTriggerInstance
- Enclosing class:
- PlayerInteractTrigger
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional<ContextAwarePredicate>
private final Optional<ItemPredicate>
-
Constructor Summary
ConstructorDescriptionTriggerInstance
(Optional<ContextAwarePredicate> p_298930_, Optional<ItemPredicate> p_300805_, Optional<ContextAwarePredicate> p_299935_) -
Method Summary
Modifier and TypeMethodDescriptionitemUsedOnEntity
(Optional<ContextAwarePredicate> p_297673_, ItemPredicate.Builder p_286235_, Optional<ContextAwarePredicate> p_301321_) itemUsedOnEntity
(ItemPredicate.Builder p_286289_, Optional<ContextAwarePredicate> p_297754_) boolean
matches
(ItemStack p_61522_, LootContext p_61523_) com.google.gson.JsonObject
Methods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
playerPredicate
-
Field Details
-
item
-
entity
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(Optional<ContextAwarePredicate> p_298930_, Optional<ItemPredicate> p_300805_, Optional<ContextAwarePredicate> p_299935_)
-
-
Method Details
-
itemUsedOnEntity
public static Criterion<PlayerInteractTrigger.TriggerInstance> itemUsedOnEntity(Optional<ContextAwarePredicate> p_297673_, ItemPredicate.Builder p_286235_, Optional<ContextAwarePredicate> p_301321_) -
itemUsedOnEntity
public static Criterion<PlayerInteractTrigger.TriggerInstance> itemUsedOnEntity(ItemPredicate.Builder p_286289_, Optional<ContextAwarePredicate> p_297754_) -
matches
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJson
in interfaceCriterionTriggerInstance
- Overrides:
serializeToJson
in classAbstractCriterionTriggerInstance
-