Class PathPointExtended
java.lang.Object
net.minecraft.world.level.pathfinder.Node
com.minecolonies.core.entity.pathfinding.PathPointExtended
public class PathPointExtended
extends net.minecraft.world.level.pathfinder.Node
Class extending pathPoint for our usage with ladders.
-
Field Summary
Fields inherited from class net.minecraft.world.level.pathfinder.Node
cameFrom, closed, costMalus, f, g, h, heapIdx, type, walkedDistance, x, y, z -
Constructor Summary
ConstructorsConstructorDescriptionPathPointExtended(@NotNull net.minecraft.core.BlockPos pos) Instantiates the pathPoint with a position. -
Method Summary
Modifier and TypeMethodDescriptionbooleannet.minecraft.core.DirectionGet the facing of the ladder.inthashCode()booleanChecks if the point is on a ladder.booleanWhether this is on rails.booleanWhether this is the rails entry.booleanWhether this is the rails exit.voidsetLadderFacing(net.minecraft.core.Direction ladderFacing) Sets the facing of the ladder.voidsetOnLadder(boolean onLadder) Sets if the point is on a ladder.voidsetOnRails(boolean isOnRails) Set if it is on rails.voidSet the rails entry.voidSet the rails exit.Methods inherited from class net.minecraft.world.level.pathfinder.Node
asBlockPos, asVec3, cloneAndMove, createFromStream, createHash, distanceManhattan, distanceManhattan, distanceTo, distanceTo, distanceToSqr, distanceToSqr, distanceToXZ, inOpenSet, readContents, toString, writeToStream
-
Constructor Details
-
PathPointExtended
public PathPointExtended(@NotNull @NotNull net.minecraft.core.BlockPos pos) Instantiates the pathPoint with a position.- Parameters:
pos- the position.
-
-
Method Details
-
isOnLadder
public boolean isOnLadder()Checks if the point is on a ladder.- Returns:
- true if so.
-
setOnLadder
public void setOnLadder(boolean onLadder) Sets if the point is on a ladder.- Parameters:
onLadder- value to set.
-
getLadderFacing
public net.minecraft.core.Direction getLadderFacing()Get the facing of the ladder.- Returns:
- Direction.
-
setLadderFacing
public void setLadderFacing(net.minecraft.core.Direction ladderFacing) Sets the facing of the ladder.- Parameters:
ladderFacing- facing to set.
-
setOnRails
public void setOnRails(boolean isOnRails) Set if it is on rails.- Parameters:
isOnRails- if on rails.
-
setRailsEntry
public void setRailsEntry()Set the rails entry. -
setRailsExit
public void setRailsExit()Set the rails exit. -
isOnRails
public boolean isOnRails()Whether this is on rails.- Returns:
- true if so.
-
isRailsEntry
public boolean isRailsEntry()Whether this is the rails entry.- Returns:
- true if so.
-
isRailsExit
public boolean isRailsExit()Whether this is the rails exit.- Returns:
- true if so.
-
equals
- Overrides:
equalsin classnet.minecraft.world.level.pathfinder.Node
-
hashCode
public int hashCode()- Overrides:
hashCodein classnet.minecraft.world.level.pathfinder.Node
-