Class PlayerHurtEntityTrigger.TriggerInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
net.minecraft.advancements.critereon.PlayerHurtEntityTrigger.TriggerInstance
- All Implemented Interfaces:
SimpleCriterionTrigger.SimpleInstance
,CriterionTriggerInstance
- Enclosing class:
- PlayerHurtEntityTrigger
public static class PlayerHurtEntityTrigger.TriggerInstance
extends AbstractCriterionTriggerInstance
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional<DamagePredicate>
private final Optional<ContextAwarePredicate>
-
Constructor Summary
ConstructorDescriptionTriggerInstance
(Optional<ContextAwarePredicate> p_300113_, Optional<DamagePredicate> p_298656_, Optional<ContextAwarePredicate> p_298604_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(ServerPlayer p_60143_, LootContext p_60144_, DamageSource p_60145_, float p_60146_, float p_60147_, boolean p_60148_) playerHurtEntity
(Optional<DamagePredicate> p_299532_, Optional<EntityPredicate> p_298332_) playerHurtEntity
(Optional<EntityPredicate> p_297304_) playerHurtEntity
(DamagePredicate.Builder p_300965_, Optional<EntityPredicate> p_298699_) playerHurtEntityWithDamage
(Optional<DamagePredicate> p_297888_) com.google.gson.JsonObject
Methods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
playerPredicate
-
Field Details
-
damage
-
entity
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(Optional<ContextAwarePredicate> p_300113_, Optional<DamagePredicate> p_298656_, Optional<ContextAwarePredicate> p_298604_)
-
-
Method Details
-
playerHurtEntity
-
playerHurtEntityWithDamage
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntityWithDamage(Optional<DamagePredicate> p_297888_) -
playerHurtEntityWithDamage
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntityWithDamage(DamagePredicate.Builder p_297478_) -
playerHurtEntity
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntity(Optional<EntityPredicate> p_297304_) -
playerHurtEntity
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntity(Optional<DamagePredicate> p_299532_, Optional<EntityPredicate> p_298332_) -
playerHurtEntity
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntity(DamagePredicate.Builder p_300965_, Optional<EntityPredicate> p_298699_) -
matches
public boolean matches(ServerPlayer p_60143_, LootContext p_60144_, DamageSource p_60145_, float p_60146_, float p_60147_, boolean p_60148_) -
serializeToJson
public com.google.gson.JsonObject serializeToJson()- Specified by:
serializeToJson
in interfaceCriterionTriggerInstance
- Overrides:
serializeToJson
in classAbstractCriterionTriggerInstance
-