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_298259_, Optional<ItemPredicate> p_298561_, Optional<ContextAwarePredicate> p_298652_) -
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_299099_, Optional<ContextAwarePredicate> p_299117_) thrownItemPickedUpByPlayer
(Optional<ContextAwarePredicate> p_298917_, Optional<ItemPredicate> p_298224_, Optional<ContextAwarePredicate> p_298405_) Methods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
playerPredicate
-
Field Details
-
item
-
entity
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(Optional<ContextAwarePredicate> p_298259_, Optional<ItemPredicate> p_298561_, Optional<ContextAwarePredicate> p_298652_)
-
-
Method Details
-
thrownItemPickedUpByEntity
public static Criterion<PickedUpItemTrigger.TriggerInstance> thrownItemPickedUpByEntity(ContextAwarePredicate p_286865_, Optional<ItemPredicate> p_299099_, Optional<ContextAwarePredicate> p_299117_) -
thrownItemPickedUpByPlayer
public static Criterion<PickedUpItemTrigger.TriggerInstance> thrownItemPickedUpByPlayer(Optional<ContextAwarePredicate> p_298917_, Optional<ItemPredicate> p_298224_, Optional<ContextAwarePredicate> p_298405_) -
matches
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJson
in interfaceCriterionTriggerInstance
- Overrides:
serializeToJson
in classAbstractCriterionTriggerInstance
-