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 aCollisionData
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockState
Returns the value of theblockState
record component.bodyPart()
Returns the value of thebodyPart
record component.int
Returns the value of thediagonalArrayIndex
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.side()
Returns the value of theside
record component.final String
toString()
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 aCollisionData
record class.- Parameters:
blockState
- the value for theblockState
record componentdiagonalArrayIndex
- the value for thediagonalArrayIndex
record componentbodyPart
- the value for thebodyPart
record componentside
- the value for theside
record component
-
-
Method Details
-
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. -
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. -
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 '=='. -
blockState
public net.minecraft.world.level.block.state.BlockState blockState()Returns the value of theblockState
record component.- Returns:
- the value of the
blockState
record component
-
diagonalArrayIndex
public int diagonalArrayIndex()Returns the value of thediagonalArrayIndex
record component.- Returns:
- the value of the
diagonalArrayIndex
record component
-
bodyPart
Returns the value of thebodyPart
record component.- Returns:
- the value of the
bodyPart
record component
-
side
Returns the value of theside
record component.- Returns:
- the value of the
side
record component
-