Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getComponentType()
- setParentPath(IPrefabPath)
- getPathId()
- setPathId(UUID)
- getPathName()
- setPathName(String)
- generateDisplayName(int, PatrolPathMarkerEntity)
- getTempPathLength()
- initialise(UUID, String, int, double, float, int, ComponentAccessor)
- getParentPath()
- isCollidable()
- isHiddenFromLivingEntity(Ref, Ref, ComponentAccessor)
- getOrder()
- setOrder(int)
- getPauseTime()
- setPauseTime(double)
- getObservationAngle()
- onReplaced()
- setObservationAngle(float)
- getWaypointPosition(ComponentAccessor)
- getWaypointRotation(ComponentAccessor)
- toString()
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
Created on 17/08/2018
-
Nested Class Summary
Nested classes/interfaces inherited from class Entity
Entity.DefaultAnimations -
Field Summary
FieldsFields inherited from class Entity
DISPLAY_NAME, LOGGER, UNASSIGNED_ID, UUID, VERSIONFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateDisplayName(int worldgenId, PatrolPathMarkerEntity patrolPathMarkerEntity) floatReturns the observation angle for the waypoint, i.e. how much an entity should be able to rotate while paused at itintgetOrder()Returns the index of this waypoint within the ordered pathdoubleReturns how long a pause is designated to be performed at the waypointshortorg.joml.Vector3dgetWaypointPosition(ComponentAccessor<EntityStore> componentAccessor) Returns the position of this waypointgetWaypointRotation(ComponentAccessor<EntityStore> componentAccessor) Returns the rotation of this waypointvoidinitialise(UUID id, String pathName, int index, double pauseTime, float observationAngle, int worldGenId, ComponentAccessor<EntityStore> componentAccessor) Initialise a newly created waypoint and add it to its target pathbooleanbooleanisHiddenFromLivingEntity(Ref<EntityStore> ref, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) Determines whether this entity is hidden from the given target entityvoidCalled if this waypoint is replaced by another with the same order indexvoidsetObservationAngle(float observationAngle) voidsetOrder(int order) voidsetParentPath(IPrefabPath parentPath) voidvoidsetPathName(String pathName) voidsetPauseTime(double pauseTime) toString()Methods inherited from class Entity
clearReference, clone, equals, getLegacyDisplayName, getNetworkId, getReference, getUuid, getWorld, hashCode, loadIntoWorld, markNeedsSave, moveTo, remove, setLegacyUUID, setReference, toHolder, unloadFromWorld, wasRemovedMethods inherited from interface Component
cloneSerializable
-
Field Details
-
CODEC
-
-
Constructor Details
-
PatrolPathMarkerEntity
public PatrolPathMarkerEntity() -
PatrolPathMarkerEntity
-
-
Method Details
-
getComponentType
-
setParentPath
-
getPathId
-
setPathId
-
getPathName
-
setPathName
-
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:IPrefabPathWaypointInitialise a newly created waypoint and add it to its target path- Specified by:
initialisein interfaceIPrefabPathWaypoint- Parameters:
id- the id of the target pathpathName- the friendly name of the target pathindex- the index at which to insert. -1 indicates appendingpauseTime- the length of time the NPC should pause at this waypointobservationAngle- the sector within which an NPC should turn at the waypointcomponentAccessor- TheComponentAccessor<EntityStore>for component access.
-
getParentPath
- Specified by:
getParentPathin interfaceIPrefabPathWaypoint- Returns:
- the parent path of this waypoint.
-
isCollidable
public boolean isCollidable()- Overrides:
isCollidablein classEntity- Returns:
trueif this entity is collidable,falseotherwise.
-
isHiddenFromLivingEntity
public boolean isHiddenFromLivingEntity(@Nonnull Ref<EntityStore> ref, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from class:EntityDetermines whether this entity is hidden from the given target entity- Overrides:
isHiddenFromLivingEntityin classEntity- Parameters:
ref- The entity reference of this entitytargetRef- The entity reference of the target entitycomponentAccessor- TheComponentAccessorfor component access- Returns:
trueif they are hidden from the target entity,falseotherwise
-
getOrder
public int getOrder()Description copied from interface:IPathWaypointReturns the index of this waypoint within the ordered path- Specified by:
getOrderin interfaceIPathWaypoint- Returns:
- index of the waypoint
-
setOrder
public void setOrder(int order) -
getPauseTime
public double getPauseTime()Description copied from interface:IPathWaypointReturns how long a pause is designated to be performed at the waypoint- Specified by:
getPauseTimein interfaceIPathWaypoint- Returns:
- pause length
-
setPauseTime
public void setPauseTime(double pauseTime) -
getObservationAngle
public float getObservationAngle()Description copied from interface:IPathWaypointReturns the observation angle for the waypoint, i.e. how much an entity should be able to rotate while paused at it- Specified by:
getObservationAnglein interfaceIPathWaypoint- Returns:
- the observation angle
-
onReplaced
public void onReplaced()Description copied from interface:IPrefabPathWaypointCalled if this waypoint is replaced by another with the same order index- Specified by:
onReplacedin interfaceIPrefabPathWaypoint
-
setObservationAngle
public void setObservationAngle(float observationAngle) -
getWaypointPosition
@Nonnull public org.joml.Vector3d getWaypointPosition(@Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:IPathWaypointReturns the position of this waypoint- Specified by:
getWaypointPositionin interfaceIPathWaypoint- Parameters:
componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
- waypoint position
-
getWaypointRotation
@Nonnull public Rotation3f getWaypointRotation(@Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:IPathWaypointReturns the rotation of this waypoint- Specified by:
getWaypointRotationin interfaceIPathWaypoint- Parameters:
componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
- waypoint rotation
-
toString
-