Class SensorPath
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.SensorBase
com.hypixel.hytale.server.npc.corecomponents.world.SensorPath
- All Implemented Interfaces:
RoleStateChange,Sensor,IAnnotatedComponent,IComponentExecutionControl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Vector3dprotected doubleprotected SensorPath.LoadStatusprotected Stringprotected intprotected intprotected final PathProviderprotected final SensorPath.PathTypeprotected final ComponentType<EntityStore, PatrolPathMarkerEntity> protected final PositionProviderprotected final ResourceType<EntityStore, SpatialResource<Ref<EntityStore>, EntityStore>> protected final doubleprotected final ComponentType<EntityStore, WorldGenId> Fields inherited from class com.hypixel.hytale.server.npc.corecomponents.SensorBase
once, triggeredFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfindClosestWaypoint(IPath<?> path, Vector3d position, Vector3d cachedTarget, ComponentAccessor<EntityStore> componentAccessor) protected IPath<?> findPath(Ref<EntityStore> ref, Vector3d position, Store<EntityStore> store, Set<UUID> disallowedPaths, boolean newPathRequested) protected booleanisInRange(double squaredDistance) booleanmatches(Ref<EntityStore> ref, Role role, double dt, Store<EntityStore> store) protected booleanpathMatches(IPath<?> path) Methods inherited from class com.hypixel.hytale.server.npc.corecomponents.SensorBase
clearOnce, isTriggered, processDelay, setOnceMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.server.npc.util.IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface com.hypixel.hytale.server.npc.instructions.RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
range
protected final double range -
pathType
-
closestWaypoint
-
disallowedPaths
-
pathProvider
-
positionProvider
-
prefabPathSpatialResource
protected final ResourceType<EntityStore,SpatialResource<Ref<EntityStore>, prefabPathSpatialResourceEntityStore>> -
patrolPathMarkerEntityComponentType
@Nullable protected final ComponentType<EntityStore,PatrolPathMarkerEntity> patrolPathMarkerEntityComponentType -
worldGenIdComponentType
-
path
-
pathIndex
protected int pathIndex -
pathChangeRevision
protected int pathChangeRevision -
distanceSquared
protected double distanceSquared -
loadStatus
-
-
Constructor Details
-
SensorPath
-
-
Method Details
-
matches
public boolean matches(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, double dt, @Nonnull Store<EntityStore> store) - Specified by:
matchesin interfaceSensor- Overrides:
matchesin classSensorBase
-
getSensorInfo
-
pathMatches
-
isInRange
protected boolean isInRange(double squaredDistance) -
findPath
@Nullable protected IPath<?> findPath(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull Store<EntityStore> store, @Nonnull Set<UUID> disallowedPaths, boolean newPathRequested) -
findClosestWaypoint
protected void findClosestWaypoint(@Nonnull IPath<?> path, @Nonnull Vector3d position, @Nonnull Vector3d cachedTarget, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-