Record Class TreeGrower.TwoByTwoSaplingPos

java.lang.Object
java.lang.Record
net.minecraft.world.level.block.grower.TreeGrower.TwoByTwoSaplingPos
Enclosing class:
TreeGrower

private static record TreeGrower.TwoByTwoSaplingPos(int offsetX, int offsetZ, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>>
    The field for the groundLevelSurroundingBlocks record component.
    private final int
    The field for the offsetX record component.
    private final int
    The field for the offsetZ record component.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    TwoByTwoSaplingPos(int offsetX, int offsetZ, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks)
    Creates an instance of a TwoByTwoSaplingPos record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>>
    Returns the value of the groundLevelSurroundingBlocks record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the offsetX record component.
    int
    Returns the value of the offsetZ 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

    • offsetX

      private final int offsetX
      The field for the offsetX record component.
    • offsetZ

      private final int offsetZ
      The field for the offsetZ record component.
    • groundLevelSurroundingBlocks

      private final List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks
      The field for the groundLevelSurroundingBlocks record component.
  • Constructor Details

    • TwoByTwoSaplingPos

      private TwoByTwoSaplingPos(int offsetX, int offsetZ, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks)
      Creates an instance of a TwoByTwoSaplingPos record class.
      Parameters:
      offsetX - the value for the offsetX record component
      offsetZ - the value for the offsetZ record component
      groundLevelSurroundingBlocks - the value for the groundLevelSurroundingBlocks record component
  • Method Details

    • 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.
    • offsetX

      public int offsetX()
      Returns the value of the offsetX record component.
      Returns:
      the value of the offsetX record component
    • offsetZ

      public int offsetZ()
      Returns the value of the offsetZ record component.
      Returns:
      the value of the offsetZ record component
    • groundLevelSurroundingBlocks

      public List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks()
      Returns the value of the groundLevelSurroundingBlocks record component.
      Returns:
      the value of the groundLevelSurroundingBlocks record component