Package net.minecraft.world.level.biome
Record Class TerrainShaper
java.lang.Object
java.lang.Record
net.minecraft.world.level.biome.TerrainShaper
public record TerrainShaper(CubicSpline<TerrainShaper.Point> offsetSampler, CubicSpline<TerrainShaper.Point> factorSampler, CubicSpline<TerrainShaper.Point> jaggednessSampler)
extends Record
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static enum
static final record
static final record
static final record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TerrainShaper>
private final CubicSpline<TerrainShaper.Point>
The field for thefactorSampler
record component.private static final float
private final CubicSpline<TerrainShaper.Point>
The field for thejaggednessSampler
record component.private static final ToFloatFunction<Float>
private final CubicSpline<TerrainShaper.Point>
The field for theoffsetSampler
record component.private static final com.mojang.serialization.Codec<CubicSpline<TerrainShaper.Point>>
static final com.mojang.serialization.Codec<CubicSpline<TerrainShaper.PointCustom>>
-
Constructor Summary
ConstructorDescriptionTerrainShaper
(CubicSpline<TerrainShaper.Point> offsetSampler, CubicSpline<TerrainShaper.Point> factorSampler, CubicSpline<TerrainShaper.Point> jaggednessSampler) Creates an instance of aTerrainShaper
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDebugBiomesToVisualizeSplinePoints
(Consumer<com.mojang.datafixers.util.Pair<Climate.ParameterPoint, ResourceKey<Biome>>> p_187320_) private static CubicSpline<TerrainShaper.Point>
buildErosionJaggednessSpline
(float p_187295_, float p_187296_, float p_187297_, float p_187298_, ToFloatFunction<Float> p_187299_) private static CubicSpline<TerrainShaper.Point>
buildErosionOffsetSpline
(float p_187285_, float p_187286_, float p_187287_, float p_187288_, float p_187289_, float p_187290_, boolean p_187291_, boolean p_187292_, ToFloatFunction<Float> p_187293_) private static CubicSpline<TerrainShaper.Point>
buildMountainRidgeSplineWithPoints
(float p_187331_, boolean p_187332_, ToFloatFunction<Float> p_187333_) private static CubicSpline<TerrainShaper.Point>
buildRidgeJaggednessSpline
(float p_187301_, float p_187302_, ToFloatFunction<Float> p_187303_) private static CubicSpline<TerrainShaper.Point>
buildWeirdnessJaggednessSpline
(float p_187305_, ToFloatFunction<Float> p_187306_) private static float
calculateMountainRidgeZeroContinentalnessPoint
(float p_187344_) private static float
calculateSlope
(float p_187272_, float p_187273_, float p_187274_, float p_187275_) final boolean
Indicates whether some other object is "equal to" this one.float
factor
(TerrainShaper.Point p_187335_) Returns the value of thefactorSampler
record component.private static float
getAmplifiedFactor
(float p_187338_) private static float
getAmplifiedJaggedness
(float p_187342_) private static float
getAmplifiedOffset
(float p_187325_) private static CubicSpline<TerrainShaper.Point>
getErosionFactor
(float p_187308_, boolean p_187309_, ToFloatFunction<Float> p_187310_) final int
hashCode()
Returns a hash code value for this object.float
jaggedness
(TerrainShaper.Point p_187340_) Returns the value of thejaggednessSampler
record component.static TerrainShaper.Point
makePoint
(float p_187268_, float p_187269_, float p_187270_) static TerrainShaper.PointCustom
makePoint
(DensityFunction.FunctionContext p_211600_) private static float
mountainContinentalness
(float p_187327_, float p_187328_, float p_187329_) float
offset
(TerrainShaper.Point p_187312_) Returns the value of theoffsetSampler
record component.static TerrainShaper
overworld
(boolean p_187322_) static float
peaksAndValleys
(float p_187266_) private static CubicSpline<TerrainShaper.Point>
ridgeSpline
(float p_187277_, float p_187278_, float p_187279_, float p_187280_, float p_187281_, float p_187282_, ToFloatFunction<Float> p_187283_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
offsetSampler
The field for theoffsetSampler
record component. -
factorSampler
The field for thefactorSampler
record component. -
jaggednessSampler
The field for thejaggednessSampler
record component. -
SPLINE_CODEC
-
SPLINE_CUSTOM_CODEC
public static final com.mojang.serialization.Codec<CubicSpline<TerrainShaper.PointCustom>> SPLINE_CUSTOM_CODEC -
CODEC
-
GLOBAL_OFFSET
private static final float GLOBAL_OFFSET- See Also:
-
NO_TRANSFORM
-
-
Constructor Details
-
TerrainShaper
public TerrainShaper(CubicSpline<TerrainShaper.Point> offsetSampler, CubicSpline<TerrainShaper.Point> factorSampler, CubicSpline<TerrainShaper.Point> jaggednessSampler) Creates an instance of aTerrainShaper
record class.- Parameters:
offsetSampler
- the value for theoffsetSampler
record componentfactorSampler
- the value for thefactorSampler
record componentjaggednessSampler
- the value for thejaggednessSampler
record component
-
-
Method Details
-
getAmplifiedOffset
private static float getAmplifiedOffset(float p_187325_) -
getAmplifiedFactor
private static float getAmplifiedFactor(float p_187338_) -
getAmplifiedJaggedness
private static float getAmplifiedJaggedness(float p_187342_) -
overworld
-
buildErosionJaggednessSpline
private static CubicSpline<TerrainShaper.Point> buildErosionJaggednessSpline(float p_187295_, float p_187296_, float p_187297_, float p_187298_, ToFloatFunction<Float> p_187299_) -
buildRidgeJaggednessSpline
private static CubicSpline<TerrainShaper.Point> buildRidgeJaggednessSpline(float p_187301_, float p_187302_, ToFloatFunction<Float> p_187303_) -
buildWeirdnessJaggednessSpline
private static CubicSpline<TerrainShaper.Point> buildWeirdnessJaggednessSpline(float p_187305_, ToFloatFunction<Float> p_187306_) -
getErosionFactor
private static CubicSpline<TerrainShaper.Point> getErosionFactor(float p_187308_, boolean p_187309_, ToFloatFunction<Float> p_187310_) -
calculateSlope
private static float calculateSlope(float p_187272_, float p_187273_, float p_187274_, float p_187275_) -
buildMountainRidgeSplineWithPoints
private static CubicSpline<TerrainShaper.Point> buildMountainRidgeSplineWithPoints(float p_187331_, boolean p_187332_, ToFloatFunction<Float> p_187333_) -
mountainContinentalness
private static float mountainContinentalness(float p_187327_, float p_187328_, float p_187329_) -
calculateMountainRidgeZeroContinentalnessPoint
private static float calculateMountainRidgeZeroContinentalnessPoint(float p_187344_) -
buildErosionOffsetSpline
private static CubicSpline<TerrainShaper.Point> buildErosionOffsetSpline(float p_187285_, float p_187286_, float p_187287_, float p_187288_, float p_187289_, float p_187290_, boolean p_187291_, boolean p_187292_, ToFloatFunction<Float> p_187293_) -
ridgeSpline
private static CubicSpline<TerrainShaper.Point> ridgeSpline(float p_187277_, float p_187278_, float p_187279_, float p_187280_, float p_187281_, float p_187282_, ToFloatFunction<Float> p_187283_) -
addDebugBiomesToVisualizeSplinePoints
public void addDebugBiomesToVisualizeSplinePoints(Consumer<com.mojang.datafixers.util.Pair<Climate.ParameterPoint, ResourceKey<Biome>>> p_187320_) -
offset
-
factor
-
jaggedness
-
makePoint
-
makePoint
-
peaksAndValleys
public static float peaksAndValleys(float p_187266_) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
offsetSampler
Returns the value of theoffsetSampler
record component.- Returns:
- the value of the
offsetSampler
record component
-
factorSampler
Returns the value of thefactorSampler
record component.- Returns:
- the value of the
factorSampler
record component
-
jaggednessSampler
Returns the value of thejaggednessSampler
record component.- Returns:
- the value of the
jaggednessSampler
record component
-