Record Class Climate.Sampler

java.lang.Object
java.lang.Record
net.minecraft.world.level.biome.Climate.Sampler
Enclosing class:
Climate

public static record Climate.Sampler(DensityFunction temperature, DensityFunction humidity, DensityFunction continentalness, DensityFunction erosion, DensityFunction depth, DensityFunction weirdness, List<Climate.ParameterPoint> spawnTarget) extends Record
  • Field Details

    • temperature

      private final DensityFunction temperature
      The field for the temperature record component.
    • humidity

      private final DensityFunction humidity
      The field for the humidity record component.
    • continentalness

      private final DensityFunction continentalness
      The field for the continentalness record component.
    • erosion

      private final DensityFunction erosion
      The field for the erosion record component.
    • depth

      private final DensityFunction depth
      The field for the depth record component.
    • weirdness

      private final DensityFunction weirdness
      The field for the weirdness record component.
    • spawnTarget

      private final List<Climate.ParameterPoint> spawnTarget
      The field for the spawnTarget record component.
  • Constructor Details

    • Sampler

      public Sampler(DensityFunction temperature, DensityFunction humidity, DensityFunction continentalness, DensityFunction erosion, DensityFunction depth, DensityFunction weirdness, List<Climate.ParameterPoint> spawnTarget)
      Creates an instance of a Sampler record class.
      Parameters:
      temperature - the value for the temperature record component
      humidity - the value for the humidity record component
      continentalness - the value for the continentalness record component
      erosion - the value for the erosion record component
      depth - the value for the depth record component
      weirdness - the value for the weirdness record component
      spawnTarget - the value for the spawnTarget record component
  • Method Details

    • sample

      public Climate.TargetPoint sample(int p_186975_, int p_186976_, int p_186977_)
    • findSpawnPosition

      public BlockPos findSpawnPosition()
    • 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.
    • temperature

      public DensityFunction temperature()
      Returns the value of the temperature record component.
      Returns:
      the value of the temperature record component
    • humidity

      public DensityFunction humidity()
      Returns the value of the humidity record component.
      Returns:
      the value of the humidity record component
    • continentalness

      public DensityFunction continentalness()
      Returns the value of the continentalness record component.
      Returns:
      the value of the continentalness record component
    • erosion

      public DensityFunction erosion()
      Returns the value of the erosion record component.
      Returns:
      the value of the erosion record component
    • depth

      public DensityFunction depth()
      Returns the value of the depth record component.
      Returns:
      the value of the depth record component
    • weirdness

      public DensityFunction weirdness()
      Returns the value of the weirdness record component.
      Returns:
      the value of the weirdness record component
    • spawnTarget

      public List<Climate.ParameterPoint> spawnTarget()
      Returns the value of the spawnTarget record component.
      Returns:
      the value of the spawnTarget record component