Record Class Blender.OutputBuffer

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.blending.Blender.OutputBuffer
Enclosing class:
Blender

public static record Blender.OutputBuffer(Blender blender, int minCellX, int minCellZ, int cellCountX, int cellCountZ, float[] alphas, float[] offsets) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float[]
    The field for the alphas record component.
    private final Blender
    The field for the blender record component.
    private final int
    The field for the cellCountX record component.
    private final int
    The field for the cellCountZ record component.
    private final int
    The field for the minCellX record component.
    private final int
    The field for the minCellZ record component.
    private static final int
     
    private final float[]
    The field for the offsets record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OutputBuffer(Blender blender, int minCellX, int minCellZ, int cellCountX, int cellCountZ, float[] alphas, float[] offsets)
    Creates an instance of a OutputBuffer record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float[]
    Returns the value of the alphas record component.
    Returns the value of the blender record component.
    int
    Returns the value of the cellCountX record component.
    int
    Returns the value of the cellCountZ record component.
     
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    getAlpha(int blockX, int blockZ)
     
    private int
    getIndex(int blockX, int blockZ)
     
    float
    getOffset(int blockX, int blockZ)
     
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the minCellX record component.
    int
    Returns the value of the minCellZ record component.
    float[]
    Returns the value of the offsets record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • blender

      private final Blender blender
      The field for the blender record component.
    • minCellX

      private final int minCellX
      The field for the minCellX record component.
    • minCellZ

      private final int minCellZ
      The field for the minCellZ record component.
    • cellCountX

      private final int cellCountX
      The field for the cellCountX record component.
    • cellCountZ

      private final int cellCountZ
      The field for the cellCountZ record component.
    • alphas

      private final float[] alphas
      The field for the alphas record component.
    • offsets

      private final float[] offsets
      The field for the offsets record component.
    • NO_VALUE

      private static final int NO_VALUE
      See Also:
  • Constructor Details

    • OutputBuffer

      public OutputBuffer(Blender blender, int minCellX, int minCellZ, int cellCountX, int cellCountZ, float[] alphas, float[] offsets)
      Creates an instance of a OutputBuffer record class.
      Parameters:
      blender - the value for the blender record component
      minCellX - the value for the minCellX record component
      minCellZ - the value for the minCellZ record component
      cellCountX - the value for the cellCountX record component
      cellCountZ - the value for the cellCountZ record component
      alphas - the value for the alphas record component
      offsets - the value for the offsets record component
  • Method Details

    • createAlphaSampler

      public DensitySampler createAlphaSampler()
    • createOffsetSampler

      public DensitySampler createOffsetSampler()
    • getAlpha

      public float getAlpha(int blockX, int blockZ)
    • getOffset

      public float getOffset(int blockX, int blockZ)
    • getIndex

      private int getIndex(int blockX, int blockZ)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • blender

      public Blender blender()
      Returns the value of the blender record component.
      Returns:
      the value of the blender record component
    • minCellX

      public int minCellX()
      Returns the value of the minCellX record component.
      Returns:
      the value of the minCellX record component
    • minCellZ

      public int minCellZ()
      Returns the value of the minCellZ record component.
      Returns:
      the value of the minCellZ record component
    • cellCountX

      public int cellCountX()
      Returns the value of the cellCountX record component.
      Returns:
      the value of the cellCountX record component
    • cellCountZ

      public int cellCountZ()
      Returns the value of the cellCountZ record component.
      Returns:
      the value of the cellCountZ record component
    • alphas

      public float[] alphas()
      Returns the value of the alphas record component.
      Returns:
      the value of the alphas record component
    • offsets

      public float[] offsets()
      Returns the value of the offsets record component.
      Returns:
      the value of the offsets record component