Record Class BlendedNoise

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.synth.BlendedNoise
All Implemented Interfaces:
DensityFunction

public record BlendedNoise(double xzScale, double yScale, double xzFactor, double yFactor, double smearScaleMultiplier) extends Record implements DensityFunction
  • Field Details

    • xzScale

      private final double xzScale
      The field for the xzScale record component.
    • yScale

      private final double yScale
      The field for the yScale record component.
    • xzFactor

      private final double xzFactor
      The field for the xzFactor record component.
    • yFactor

      private final double yFactor
      The field for the yFactor record component.
    • smearScaleMultiplier

      private final double smearScaleMultiplier
      The field for the smearScaleMultiplier record component.
    • SCALE_RANGE

      private static final com.mojang.serialization.Codec<Double> SCALE_RANGE
    • CODEC

      public static final com.mojang.serialization.MapCodec<BlendedNoise> CODEC
    • BASE_SCALE

      private static final double BASE_SCALE
      See Also:
    • LIMIT_FACTOR

      private static final double LIMIT_FACTOR
      See Also:
    • MAIN_FACTOR

      private static final double MAIN_FACTOR
      See Also:
    • LIMIT_FIRST_OCTAVE

      private static final int LIMIT_FIRST_OCTAVE
      See Also:
    • MAIN_FIRST_OCTAVE

      private static final int MAIN_FIRST_OCTAVE
      See Also:
    • NOISE_SEED

      public static final Identifier NOISE_SEED
  • Constructor Details

    • BlendedNoise

      public BlendedNoise(double xzScale, double yScale, double xzFactor, double yFactor, double smearScaleMultiplier)
      Creates an instance of a BlendedNoise record class.
      Parameters:
      xzScale - the value for the xzScale record component
      yScale - the value for the yScale record component
      xzFactor - the value for the xzFactor record component
      yFactor - the value for the yFactor record component
      smearScaleMultiplier - the value for the smearScaleMultiplier record component
  • Method Details

    • xzMultiplier

      private double xzMultiplier()
    • yMultiplier

      private double yMultiplier()
    • createFbmSet

      public BlendedNoise.FbmSet createFbmSet(RandomSource random)
    • createFbm

      public static NoiseStack createFbm(RandomSource random, int firstOctave, double smearScaleY, double valueFactor)
    • computeFbmRange

      private static Interval computeFbmRange(int firstOctave, double smearScaleY, double valueFactor)
    • compileSampler

      public DensitySampler compileSampler(DensityFunction.CompileContext context)
      Specified by:
      compileSampler in interface DensityFunction
    • compileSampler

      public DensitySampler compileSampler(RandomSource random)
    • range

      public Interval range()
      Specified by:
      range in interface DensityFunction
    • domainAxes

      public int domainAxes()
      Specified by:
      domainAxes in interface DensityFunction
    • codec

      public com.mojang.serialization.MapCodec<BlendedNoise> codec()
      Specified by:
      codec in interface DensityFunction
    • rewriteChildren

      public DensityFunction rewriteChildren(DfRewriteRule rule)
      Specified by:
      rewriteChildren in interface DensityFunction
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • xzScale

      public double xzScale()
      Returns the value of the xzScale record component.
      Returns:
      the value of the xzScale record component
    • yScale

      public double yScale()
      Returns the value of the yScale record component.
      Returns:
      the value of the yScale record component
    • xzFactor

      public double xzFactor()
      Returns the value of the xzFactor record component.
      Returns:
      the value of the xzFactor record component
    • yFactor

      public double yFactor()
      Returns the value of the yFactor record component.
      Returns:
      the value of the yFactor record component
    • smearScaleMultiplier

      public double smearScaleMultiplier()
      Returns the value of the smearScaleMultiplier record component.
      Returns:
      the value of the smearScaleMultiplier record component