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
FieldsModifier and TypeFieldDescriptionprivate final List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> The field for thegroundLevelSurroundingBlocksrecord component.private final intThe field for theoffsetXrecord component.private final intThe field for theoffsetZrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTwoByTwoSaplingPos(int offsetX, int offsetZ, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks) Creates an instance of aTwoByTwoSaplingPosrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> Returns the value of thegroundLevelSurroundingBlocksrecord component.final inthashCode()Returns a hash code value for this object.intoffsetX()Returns the value of theoffsetXrecord component.intoffsetZ()Returns the value of theoffsetZrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
offsetX
private final int offsetXThe field for theoffsetXrecord component. -
offsetZ
private final int offsetZThe field for theoffsetZrecord component. -
groundLevelSurroundingBlocks
private final List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocksThe field for thegroundLevelSurroundingBlocksrecord component.
-
-
Constructor Details
-
TwoByTwoSaplingPos
private TwoByTwoSaplingPos(int offsetX, int offsetZ, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks) Creates an instance of aTwoByTwoSaplingPosrecord class.- Parameters:
offsetX- the value for theoffsetXrecord componentoffsetZ- the value for theoffsetZrecord componentgroundLevelSurroundingBlocks- the value for thegroundLevelSurroundingBlocksrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
offsetX
public int offsetX()Returns the value of theoffsetXrecord component.- Returns:
- the value of the
offsetXrecord component
-
offsetZ
public int offsetZ()Returns the value of theoffsetZrecord component.- Returns:
- the value of the
offsetZrecord component
-
groundLevelSurroundingBlocks
Returns the value of thegroundLevelSurroundingBlocksrecord component.- Returns:
- the value of the
groundLevelSurroundingBlocksrecord component
-