Class PathManager

java.lang.Object
com.hypixel.hytale.server.npc.entities.PathManager

public class PathManager extends Object
The path manager associated with an NPC, which handles setting and fetching the current path of the NPC entity.
  • Field Details

  • Constructor Details

    • PathManager

      public PathManager()
  • Method Details

    • setPrefabPath

      public void setPrefabPath(@Nonnull UUID currentPath, @Nonnull IPrefabPath path)
      Called to set the current path based on the given prefab path.
      Parameters:
      currentPath - The UUID of the current path.
      path - The given prefab path instance to set.
    • setTransientPath

      public void setTransientPath(@Nonnull IPath<?> path)
      Called to set the current path based on the given transient path.
      Parameters:
      path - The given path instance to set.
    • isFollowingPath

      public boolean isFollowingPath()
      Determines whether the NPC is currently following a path.
      Returns:
      true if the NPC is following a path, false otherwise.
    • getCurrentPathHint

      @Nullable public UUID getCurrentPathHint()
      Returns:
      the UUID of the current path hint, if any.
    • getPath

      @Nullable public IPath<?> getPath(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to fetch the current path that the NPC is on.
      Parameters:
      ref - The entity reference of the NPC entity.
      componentAccessor - The ComponentAccessor for component access.
      Returns:
      the IPath instance of the current path, or null if not set.