public class LocationPredicate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LocationPredicate.Builder |
Modifier and Type | Field and Description |
---|---|
static LocationPredicate |
ANY |
private Biome |
biome |
private BlockPredicate |
block |
private DimensionType |
dimension |
private StructureFeature<?> |
feature |
private FluidPredicate |
fluid |
private LightPredicate |
light |
private NumberRange.FloatRange |
x |
private NumberRange.FloatRange |
y |
private NumberRange.FloatRange |
z |
Constructor and Description |
---|
LocationPredicate(NumberRange.FloatRange x,
NumberRange.FloatRange y,
NumberRange.FloatRange z,
Biome biome,
StructureFeature<?> feature,
DimensionType dimension,
LightPredicate light,
BlockPredicate block,
FluidPredicate fluid) |
Modifier and Type | Method and Description |
---|---|
static LocationPredicate |
biome(Biome biome) |
static LocationPredicate |
dimension(DimensionType dimension) |
static LocationPredicate |
feature(StructureFeature<?> feature) |
static LocationPredicate |
fromJson(JsonElement element) |
boolean |
test(ServerWorld world,
double x,
double y,
double z) |
boolean |
test(ServerWorld world,
float x,
float y,
float z) |
JsonElement |
toJson() |
public static final LocationPredicate ANY
private final NumberRange.FloatRange x
private final NumberRange.FloatRange y
private final NumberRange.FloatRange z
@Nullable private final StructureFeature<?> feature
@Nullable private final DimensionType dimension
private final LightPredicate light
private final BlockPredicate block
private final FluidPredicate fluid
public LocationPredicate(NumberRange.FloatRange x, NumberRange.FloatRange y, NumberRange.FloatRange z, @Nullable Biome biome, @Nullable StructureFeature<?> feature, @Nullable DimensionType dimension, LightPredicate light, BlockPredicate block, FluidPredicate fluid)
public static LocationPredicate biome(Biome biome)
public static LocationPredicate dimension(DimensionType dimension)
public static LocationPredicate feature(StructureFeature<?> feature)
public boolean test(ServerWorld world, double x, double y, double z)
public boolean test(ServerWorld world, float x, float y, float z)
public JsonElement toJson()
public static LocationPredicate fromJson(@Nullable JsonElement element)