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
Nested ClassesModifier and TypeClassDescriptionprotected static enumstatic final recordstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TerrainShaper>private final CubicSpline<TerrainShaper.Point>The field for thefactorSamplerrecord component.private static final floatprivate final CubicSpline<TerrainShaper.Point>The field for thejaggednessSamplerrecord component.private static final ToFloatFunction<Float>private final CubicSpline<TerrainShaper.Point>The field for theoffsetSamplerrecord component.private static final com.mojang.serialization.Codec<CubicSpline<TerrainShaper.Point>>static final com.mojang.serialization.Codec<CubicSpline<TerrainShaper.PointCustom>> -
Constructor Summary
ConstructorsConstructorDescriptionTerrainShaper(CubicSpline<TerrainShaper.Point> offsetSampler, CubicSpline<TerrainShaper.Point> factorSampler, CubicSpline<TerrainShaper.Point> jaggednessSampler) Creates an instance of aTerrainShaperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDebugBiomesToVisualizeSplinePoints(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 floatcalculateMountainRidgeZeroContinentalnessPoint(float p_187344_) private static floatcalculateSlope(float p_187272_, float p_187273_, float p_187274_, float p_187275_) final booleanIndicates whether some other object is "equal to" this one.floatfactor(TerrainShaper.Point p_187335_) Returns the value of thefactorSamplerrecord component.private static floatgetAmplifiedFactor(float p_187338_) private static floatgetAmplifiedJaggedness(float p_187342_) private static floatgetAmplifiedOffset(float p_187325_) private static CubicSpline<TerrainShaper.Point>getErosionFactor(float p_187308_, boolean p_187309_, ToFloatFunction<Float> p_187310_) final inthashCode()Returns a hash code value for this object.floatjaggedness(TerrainShaper.Point p_187340_) Returns the value of thejaggednessSamplerrecord component.static TerrainShaper.PointmakePoint(float p_187268_, float p_187269_, float p_187270_) static TerrainShaper.PointCustommakePoint(DensityFunction.FunctionContext p_211600_) private static floatmountainContinentalness(float p_187327_, float p_187328_, float p_187329_) floatoffset(TerrainShaper.Point p_187312_) Returns the value of theoffsetSamplerrecord component.static TerrainShaperoverworld(boolean p_187322_) static floatpeaksAndValleys(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 StringtoString()Returns a string representation of this record class.
-
Field Details
-
offsetSampler
The field for theoffsetSamplerrecord component. -
factorSampler
The field for thefactorSamplerrecord component. -
jaggednessSampler
The field for thejaggednessSamplerrecord 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 aTerrainShaperrecord class.- Parameters:
offsetSampler- the value for theoffsetSamplerrecord componentfactorSampler- the value for thefactorSamplerrecord componentjaggednessSampler- the value for thejaggednessSamplerrecord 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 theoffsetSamplerrecord component.- Returns:
- the value of the
offsetSamplerrecord component
-
factorSampler
Returns the value of thefactorSamplerrecord component.- Returns:
- the value of the
factorSamplerrecord component
-
jaggednessSampler
Returns the value of thejaggednessSamplerrecord component.- Returns:
- the value of the
jaggednessSamplerrecord component
-