public static class LevitationCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private DistancePredicate |
distance |
private NumberRange.IntRange |
duration |
Constructor and Description |
---|
Conditions(EntityPredicate.Extended player,
DistancePredicate distance,
NumberRange.IntRange duration) |
Modifier and Type | Method and Description |
---|---|
static LevitationCriterion.Conditions |
create(DistancePredicate distance) |
boolean |
matches(ServerPlayerEntity player,
Vec3d startPos,
int duration) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final DistancePredicate distance
private final NumberRange.IntRange duration
public Conditions(EntityPredicate.Extended player, DistancePredicate distance, NumberRange.IntRange duration)
public static LevitationCriterion.Conditions create(DistancePredicate distance)
public boolean matches(ServerPlayerEntity player, Vec3d startPos, int duration)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions