public static class PlayerHurtEntityCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private DamagePredicate |
damage |
private EntityPredicate.Extended |
entity |
Constructor and Description |
---|
Conditions(EntityPredicate.Extended player,
DamagePredicate damage,
EntityPredicate.Extended entity) |
Modifier and Type | Method and Description |
---|---|
static PlayerHurtEntityCriterion.Conditions |
create(DamagePredicate.Builder hurtEntityPredicateBuilder) |
boolean |
matches(ServerPlayerEntity player,
LootContext entityContext,
DamageSource source,
float dealt,
float taken,
boolean blocked) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final DamagePredicate damage
private final EntityPredicate.Extended entity
public Conditions(EntityPredicate.Extended player, DamagePredicate damage, EntityPredicate.Extended entity)
public static PlayerHurtEntityCriterion.Conditions create(DamagePredicate.Builder hurtEntityPredicateBuilder)
public boolean matches(ServerPlayerEntity player, LootContext entityContext, DamageSource source, float dealt, float taken, boolean blocked)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions