Package net.minecraft.world.biome
Class Biome.MixedNoisePoint
java.lang.Object
net.minecraft.world.biome.Biome.MixedNoisePoint
- Enclosing class:
- Biome
public static class Biome.MixedNoisePoint extends Object
Represents a point in a multi-dimensional cartesian plane. Mixed-noise
biome generator picks the closest noise point from its selected point
and choose the biome associated to that closest point. Another factor,
rarity potential, favors larger differences in values instead, contrary
to other point values.
-
Field Summary
Fields Modifier and Type Field Description private float
altitude
static com.mojang.serialization.Codec<Biome.MixedNoisePoint>
CODEC
private float
humidity
private float
temperature
private float
weight
This value awards another point with value farthest from this one; i.e.private float
weirdness
-
Constructor Summary
Constructors Constructor Description MixedNoisePoint(float temperature, float humidity, float altitude, float weirdness, float weight)
-
Method Summary
Modifier and Type Method Description float
calculateDistanceTo(Biome.MixedNoisePoint other)
Calculates the distance from this noise point to another one.boolean
equals(Object object)
int
hashCode()
-
Field Details
-
CODEC
-
temperature
private final float temperature -
humidity
private final float humidity -
altitude
private final float altitude -
weirdness
private final float weirdness -
weight
private final float weightThis value awards another point with value farthest from this one; i.e. unlike other points where closer distance is better, for this value the farther the better. The result of the different values can be approximately modeled by a hyperbola weight=cosh(peak-1) as used by the mixed-noise generator.
-
-
Constructor Details
-
MixedNoisePoint
public MixedNoisePoint(float temperature, float humidity, float altitude, float weirdness, float weight)
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
calculateDistanceTo
Calculates the distance from this noise point to another one. The distance is a squared distance in a multi-dimensional cartesian plane from a mathematical point of view, with a special parameter that reduces the calculated distance.For most fields except weight, smaller difference between two points' fields will lead to smaller distance. For weight, larger differences lead to smaller distance.
This distance is used by the mixed-noise biome layer source. The layer source calculates an arbitrary noise point, and selects the biome that offers a closest point to its arbitrary point.
- Parameters:
other
- the other noise point
-