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

    Constructors
    Constructor
    Description
    PathPointExtended(@NotNull net.minecraft.core.BlockPos pos)
    Instantiates the pathPoint with a position.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    net.minecraft.core.Direction
    Get the facing of the ladder.
    int
     
    boolean
    Checks if the point is on a ladder.
    boolean
    Whether this is on rails.
    boolean
    Whether this is the rails entry.
    boolean
    Whether this is the rails exit.
    void
    setLadderFacing(net.minecraft.core.Direction ladderFacing)
    Sets the facing of the ladder.
    void
    setOnLadder(boolean onLadder)
    Sets if the point is on a ladder.
    void
    setOnRails(boolean isOnRails)
    Set if it is on rails.
    void
    Set the rails entry.
    void
    Set 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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      public boolean equals(Object o)
      Overrides:
      equals in class net.minecraft.world.level.pathfinder.Node
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class net.minecraft.world.level.pathfinder.Node