Record Class DiagonalCollisionCalculator.CollisionData
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.graph.DiagonalCollisionCalculator.CollisionData
- Enclosing class:
DiagonalCollisionCalculator
public static record DiagonalCollisionCalculator.CollisionData(net.minecraft.world.level.block.state.BlockState blockState, int diagonalArrayIndex, BodyPart bodyPart, MovementSide side)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCollisionData(net.minecraft.world.level.block.state.BlockState blockState, int diagonalArrayIndex, BodyPart bodyPart, MovementSide side) Creates an instance of aCollisionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockStateReturns the value of theblockStaterecord component.bodyPart()Returns the value of thebodyPartrecord component.intReturns the value of thediagonalArrayIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.side()Returns the value of thesiderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollisionData
public CollisionData(net.minecraft.world.level.block.state.BlockState blockState, int diagonalArrayIndex, BodyPart bodyPart, MovementSide side) Creates an instance of aCollisionDatarecord class.- Parameters:
blockState- the value for theblockStaterecord componentdiagonalArrayIndex- the value for thediagonalArrayIndexrecord componentbodyPart- the value for thebodyPartrecord componentside- the value for thesiderecord 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. -
blockState
public net.minecraft.world.level.block.state.BlockState blockState()Returns the value of theblockStaterecord component.- Returns:
- the value of the
blockStaterecord component
-
diagonalArrayIndex
public int diagonalArrayIndex()Returns the value of thediagonalArrayIndexrecord component.- Returns:
- the value of the
diagonalArrayIndexrecord component
-
bodyPart
Returns the value of thebodyPartrecord component.- Returns:
- the value of the
bodyPartrecord component
-
side
Returns the value of thesiderecord component.- Returns:
- the value of the
siderecord component
-