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
  • Field Details

  • Constructor Details

    • TerrainShaper

      public TerrainShaper(CubicSpline<TerrainShaper.Point> offsetSampler, CubicSpline<TerrainShaper.Point> factorSampler, CubicSpline<TerrainShaper.Point> jaggednessSampler)
      Creates an instance of a TerrainShaper record class.
      Parameters:
      offsetSampler - the value for the offsetSampler record component
      factorSampler - the value for the factorSampler record component
      jaggednessSampler - the value for the jaggednessSampler 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

      public static TerrainShaper overworld(boolean p_187322_)
    • 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

      public float offset(TerrainShaper.Point p_187312_)
    • factor

      public float factor(TerrainShaper.Point p_187335_)
    • jaggedness

      public float jaggedness(TerrainShaper.Point p_187340_)
    • makePoint

      public static TerrainShaper.Point makePoint(float p_187268_, float p_187269_, float p_187270_)
    • makePoint

      public static TerrainShaper.PointCustom makePoint(DensityFunction.FunctionContext p_211600_)
    • peaksAndValleys

      public static float peaksAndValleys(float p_187266_)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • offsetSampler

      public CubicSpline<TerrainShaper.Point> offsetSampler()
      Returns the value of the offsetSampler record component.
      Returns:
      the value of the offsetSampler record component
    • factorSampler

      public CubicSpline<TerrainShaper.Point> factorSampler()
      Returns the value of the factorSampler record component.
      Returns:
      the value of the factorSampler record component
    • jaggednessSampler

      public CubicSpline<TerrainShaper.Point> jaggednessSampler()
      Returns the value of the jaggednessSampler record component.
      Returns:
      the value of the jaggednessSampler record component