Class PickedUpItemTrigger.TriggerInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
net.minecraft.advancements.critereon.PickedUpItemTrigger.TriggerInstance
- All Implemented Interfaces:
SimpleCriterionTrigger.SimpleInstance
,CriterionTriggerInstance
- Enclosing class:
- PickedUpItemTrigger
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional<ContextAwarePredicate>
private final Optional<ItemPredicate>
-
Constructor Summary
ConstructorDescriptionTriggerInstance
(Optional<ContextAwarePredicate> p_301295_, Optional<ItemPredicate> p_299626_, Optional<ContextAwarePredicate> p_299252_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(ServerPlayer p_221323_, ItemStack p_221324_, LootContext p_221325_) com.google.gson.JsonObject
thrownItemPickedUpByEntity
(ContextAwarePredicate p_286865_, Optional<ItemPredicate> p_297283_, Optional<ContextAwarePredicate> p_300033_) thrownItemPickedUpByPlayer
(Optional<ContextAwarePredicate> p_299013_, Optional<ItemPredicate> p_299788_, Optional<ContextAwarePredicate> p_299814_) Methods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
playerPredicate
-
Field Details
-
item
-
entity
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(Optional<ContextAwarePredicate> p_301295_, Optional<ItemPredicate> p_299626_, Optional<ContextAwarePredicate> p_299252_)
-
-
Method Details
-
thrownItemPickedUpByEntity
public static Criterion<PickedUpItemTrigger.TriggerInstance> thrownItemPickedUpByEntity(ContextAwarePredicate p_286865_, Optional<ItemPredicate> p_297283_, Optional<ContextAwarePredicate> p_300033_) -
thrownItemPickedUpByPlayer
public static Criterion<PickedUpItemTrigger.TriggerInstance> thrownItemPickedUpByPlayer(Optional<ContextAwarePredicate> p_299013_, Optional<ItemPredicate> p_299788_, Optional<ContextAwarePredicate> p_299814_) -
matches
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJson
in interfaceCriterionTriggerInstance
- Overrides:
serializeToJson
in classAbstractCriterionTriggerInstance
-