Record Class NodeState
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.NodeState
Represents the minimal state we are in the Minecraft world.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockPosition
record component.boolean
Indicates whether some other object is "equal to" this one.static NodeState
forInfo
(SFVec3i blockPosition, ProjectedInventory inventory) int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
Returns the value of theusableBlockItems
record component.
-
Constructor Details
-
NodeState
Creates an instance of aNodeState
record class.- Parameters:
blockPosition
- the value for theblockPosition
record componentusableBlockItems
- the value for theusableBlockItems
record component
-
-
Method Details
-
forInfo
-
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
blockPosition
Returns the value of theblockPosition
record component.- Returns:
- the value of the
blockPosition
record component
-
usableBlockItems
public int usableBlockItems()Returns the value of theusableBlockItems
record component.- Returns:
- the value of the
usableBlockItems
record component
-