public static class OnKilledCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private EntityPredicate.Extended |
entity |
private DamageSourcePredicate |
killingBlow |
Constructor and Description |
---|
Conditions(Identifier id,
EntityPredicate.Extended player,
EntityPredicate.Extended entity,
DamageSourcePredicate killingBlow) |
Modifier and Type | Method and Description |
---|---|
static OnKilledCriterion.Conditions |
createEntityKilledPlayer() |
static OnKilledCriterion.Conditions |
createPlayerKilledEntity() |
static OnKilledCriterion.Conditions |
createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder) |
static OnKilledCriterion.Conditions |
createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder,
DamageSourcePredicate.Builder killingBlowBuilder) |
boolean |
test(ServerPlayerEntity player,
LootContext killedEntityContext,
DamageSource killingBlow) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final EntityPredicate.Extended entity
private final DamageSourcePredicate killingBlow
public Conditions(Identifier id, EntityPredicate.Extended player, EntityPredicate.Extended entity, DamageSourcePredicate killingBlow)
public static OnKilledCriterion.Conditions createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder)
public static OnKilledCriterion.Conditions createPlayerKilledEntity()
public static OnKilledCriterion.Conditions createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder, DamageSourcePredicate.Builder killingBlowBuilder)
public static OnKilledCriterion.Conditions createEntityKilledPlayer()
public boolean test(ServerPlayerEntity player, LootContext killedEntityContext, DamageSource killingBlow)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions