Class PatrolPathMarkerEntity

java.lang.Object
com.hypixel.hytale.server.core.entity.Entity
com.hypixel.hytale.builtin.path.entities.PatrolPathMarkerEntity
All Implemented Interfaces:
IPrefabPathWaypoint, Component<EntityStore>, IPathWaypoint, Cloneable

public class PatrolPathMarkerEntity extends Entity implements IPrefabPathWaypoint
Created on 17/08/2018
  • Field Details

  • Constructor Details

    • PatrolPathMarkerEntity

      public PatrolPathMarkerEntity()
    • PatrolPathMarkerEntity

      public PatrolPathMarkerEntity(@Nullable World world)
  • Method Details

    • getComponentType

      @Nullable public static ComponentType<EntityStore, PatrolPathMarkerEntity> getComponentType()
    • setParentPath

      public void setParentPath(IPrefabPath parentPath)
    • getPathId

      @Nullable public UUID getPathId()
    • setPathId

      public void setPathId(UUID pathId)
    • getPathName

      public String getPathName()
    • setPathName

      public void setPathName(String pathName)
    • generateDisplayName

      @Nonnull public static String generateDisplayName(int worldgenId, PatrolPathMarkerEntity patrolPathMarkerEntity)
    • getTempPathLength

      public short getTempPathLength()
    • initialise

      public void initialise(@Nonnull UUID id, @Nonnull String pathName, int index, double pauseTime, float observationAngle, int worldGenId, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Description copied from interface: IPrefabPathWaypoint
      Initialise a newly created waypoint and add it to its target path
      Specified by:
      initialise in interface IPrefabPathWaypoint
      Parameters:
      id - the id of the target path
      pathName - the friendly name of the target path
      index - the index at which to insert. -1 indicates appending
      pauseTime - the length of time the NPC should pause at this waypoint
      observationAngle - the sector within which an NPC should turn at the waypoint
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • getParentPath

      public IPath<IPrefabPathWaypoint> getParentPath()
      Specified by:
      getParentPath in interface IPrefabPathWaypoint
      Returns:
      the parent path of this waypoint.
    • isCollidable

      public boolean isCollidable()
      Overrides:
      isCollidable in class Entity
      Returns:
      true if this entity is collidable, false otherwise.
    • isHiddenFromLivingEntity

      public boolean isHiddenFromLivingEntity(@Nonnull Ref<EntityStore> ref, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Description copied from class: Entity
      Determines whether this entity is hidden from the given target entity
      Overrides:
      isHiddenFromLivingEntity in class Entity
      Parameters:
      ref - The entity reference of this entity
      targetRef - The entity reference of the target entity
      componentAccessor - The ComponentAccessor for component access
      Returns:
      true if they are hidden from the target entity, false otherwise
    • getOrder

      public int getOrder()
      Description copied from interface: IPathWaypoint
      Returns the index of this waypoint within the ordered path
      Specified by:
      getOrder in interface IPathWaypoint
      Returns:
      index of the waypoint
    • setOrder

      public void setOrder(int order)
    • getPauseTime

      public double getPauseTime()
      Description copied from interface: IPathWaypoint
      Returns how long a pause is designated to be performed at the waypoint
      Specified by:
      getPauseTime in interface IPathWaypoint
      Returns:
      pause length
    • setPauseTime

      public void setPauseTime(double pauseTime)
    • getObservationAngle

      public float getObservationAngle()
      Description copied from interface: IPathWaypoint
      Returns the observation angle for the waypoint, i.e. how much an entity should be able to rotate while paused at it
      Specified by:
      getObservationAngle in interface IPathWaypoint
      Returns:
      the observation angle
    • onReplaced

      public void onReplaced()
      Description copied from interface: IPrefabPathWaypoint
      Called if this waypoint is replaced by another with the same order index
      Specified by:
      onReplaced in interface IPrefabPathWaypoint
    • setObservationAngle

      public void setObservationAngle(float observationAngle)
    • getWaypointPosition

      @Nonnull public org.joml.Vector3d getWaypointPosition(@Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Description copied from interface: IPathWaypoint
      Returns the position of this waypoint
      Specified by:
      getWaypointPosition in interface IPathWaypoint
      Parameters:
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
      Returns:
      waypoint position
    • getWaypointRotation

      @Nonnull public Rotation3f getWaypointRotation(@Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Description copied from interface: IPathWaypoint
      Returns the rotation of this waypoint
      Specified by:
      getWaypointRotation in interface IPathWaypoint
      Parameters:
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
      Returns:
      waypoint rotation
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Entity