Class ItemUsedOnBlockTrigger.TriggerInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
net.minecraft.advancements.critereon.ItemUsedOnBlockTrigger.TriggerInstance
- All Implemented Interfaces:
CriterionTriggerInstance
- Enclosing class:
- ItemUsedOnBlockTrigger
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTriggerInstance(EntityPredicate.Composite p_45504_, LocationPredicate p_45505_, ItemPredicate p_45506_)
-
Method Summary
Modifier and TypeMethodDescriptionitemUsedOnBlock(LocationPredicate.Builder p_45508_, ItemPredicate.Builder p_45509_)
boolean
matches(BlockState p_45511_, ServerLevel p_45512_, BlockPos p_45513_, ItemStack p_45514_)
com.google.gson.JsonObject
serializeToJson(SerializationContext p_45516_)
Methods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
getCriterion, getPlayerPredicate, toString
-
Field Details
-
location
-
item
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(EntityPredicate.Composite p_45504_, LocationPredicate p_45505_, ItemPredicate p_45506_)
-
-
Method Details
-
itemUsedOnBlock
public static ItemUsedOnBlockTrigger.TriggerInstance itemUsedOnBlock(LocationPredicate.Builder p_45508_, ItemPredicate.Builder p_45509_) -
matches
public boolean matches(BlockState p_45511_, ServerLevel p_45512_, BlockPos p_45513_, ItemStack p_45514_) -
serializeToJson
- Specified by:
serializeToJson
in interfaceCriterionTriggerInstance
- Overrides:
serializeToJson
in classAbstractCriterionTriggerInstance
-