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_299157_, Optional<DamagePredicate> p_298533_, Optional<ContextAwarePredicate> p_298308_) -
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_301287_, Optional<EntityPredicate> p_300951_) playerHurtEntity
(Optional<EntityPredicate> p_298252_) playerHurtEntity
(DamagePredicate.Builder p_301281_, Optional<EntityPredicate> p_298362_) playerHurtEntityWithDamage
(Optional<DamagePredicate> p_300880_) 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_299157_, Optional<DamagePredicate> p_298533_, Optional<ContextAwarePredicate> p_298308_)
-
-
Method Details
-
playerHurtEntity
-
playerHurtEntityWithDamage
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntityWithDamage(Optional<DamagePredicate> p_300880_) -
playerHurtEntityWithDamage
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntityWithDamage(DamagePredicate.Builder p_300924_) -
playerHurtEntity
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntity(Optional<EntityPredicate> p_298252_) -
playerHurtEntity
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntity(Optional<DamagePredicate> p_301287_, Optional<EntityPredicate> p_300951_) -
playerHurtEntity
public static Criterion<PlayerHurtEntityTrigger.TriggerInstance> playerHurtEntity(DamagePredicate.Builder p_301281_, Optional<EntityPredicate> p_298362_) -
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
-