Record Class MovementMiningCost
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.graph.actions.movement.MovementMiningCost
-
Constructor Summary
ConstructorsConstructorDescriptionMovementMiningCost
(@NonNull SFVec3i block, double miningCost, boolean willDropUsableBlockItem, @NonNull BlockFace blockBreakSideHint) Creates an instance of aMovementMiningCost
record class. -
Method Summary
Modifier and TypeMethodDescription@NonNull SFVec3i
block()
Returns the value of theblock
record component.@NonNull BlockFace
Returns the value of theblockBreakSideHint
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.double
Returns the value of theminingCost
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of thewillDropUsableBlockItem
record component.
-
Constructor Details
-
MovementMiningCost
public MovementMiningCost(@NonNull @NonNull SFVec3i block, double miningCost, boolean willDropUsableBlockItem, @NonNull @NonNull BlockFace blockBreakSideHint) Creates an instance of aMovementMiningCost
record class.- Parameters:
block
- the value for theblock
record componentminingCost
- the value for theminingCost
record componentwillDropUsableBlockItem
- the value for thewillDropUsableBlockItem
record componentblockBreakSideHint
- the value for theblockBreakSideHint
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 '=='. -
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
miningCost
public double miningCost()Returns the value of theminingCost
record component.- Returns:
- the value of the
miningCost
record component
-
willDropUsableBlockItem
public boolean willDropUsableBlockItem()Returns the value of thewillDropUsableBlockItem
record component.- Returns:
- the value of the
willDropUsableBlockItem
record component
-
blockBreakSideHint
Returns the value of theblockBreakSideHint
record component.- Returns:
- the value of the
blockBreakSideHint
record component
-