Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- matches(Ref, ExecutionSupport, double, Store)
- done()
- getSensorInfo()
- registerWithSupport(ExecutionSupport)
- motionControllerChanged(Ref, NPCEntity, MotionController, ComponentAccessor)
- loaded(ExecutionSupport)
- spawned(ExecutionSupport)
- unloaded(ExecutionSupport)
- removed(ExecutionSupport)
- teleported(ExecutionSupport, World, World)
Class SensorEntityBase
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.SensorBase
com.hypixel.hytale.server.npc.corecomponents.SensorWithEntityFilters
com.hypixel.hytale.server.npc.corecomponents.entity.SensorEntityBase
- All Implemented Interfaces:
RoleStateChange, Sensor, IAnnotatedComponent, IAnnotatedComponentCollection, IComponentExecutionControl
- Direct Known Subclasses:
SensorEntity, SensorPlayer
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSensorEntityBase(BuilderSensorEntityBase builder, ISensorEntityPrioritiser prioritiser, BuilderSupport builderSupport) -
Method Summary
Modifier and TypeMethodDescriptionvoiddone()Get access to sensor info result if the sensor supports this in principle.voidloaded(ExecutionSupport executionSupport) booleanmatches(Ref<EntityStore> ref, ExecutionSupport executionSupport, double dt, Store<EntityStore> store) voidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(ExecutionSupport executionSupport) voidremoved(ExecutionSupport executionSupport) voidspawned(ExecutionSupport executionSupport) voidteleported(ExecutionSupport executionSupport, World from, World to) voidunloaded(ExecutionSupport executionSupport) Methods inherited from class SensorWithEntityFilters
componentCount, getComponent, setContextMethods inherited from class SensorBase
clearOnce, isTriggered, processDelay, setOnceMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent
-
Constructor Details
-
SensorEntityBase
public SensorEntityBase(@Nonnull BuilderSensorEntityBase builder, ISensorEntityPrioritiser prioritiser, @Nonnull BuilderSupport builderSupport)
-
-
Method Details
-
matches
public boolean matches(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, double dt, @Nonnull Store<EntityStore> store) - Specified by:
matchesin interfaceSensor- Overrides:
matchesin classSensorBase
-
done
public void done() -
getSensorInfo
Description copied from interface:SensorGet access to sensor info result if the sensor supports this in principle.Sensors can provide positional (and other) information if they are in matching state, like SensorPlayer or SensorEntity, while for other sensors, like SensorState, this wouldn't make sense. For sensors wrapping other sensors, like SensorAnd or SensorOr, it depends on the child sensors if positional information can be returned.
Note: Returning a non-null value does not imply that the sensor actually returns a valid position in the current moment. This will depend on whether the sensor is in matching state or not.
- Returns:
- InfoProvider instance if the sensor is capable of returning information else null
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange- Overrides:
registerWithSupportin classSensorWithEntityFilters
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) - Specified by:
motionControllerChangedin interfaceRoleStateChange- Overrides:
motionControllerChangedin classSensorWithEntityFilters
-
loaded
- Specified by:
loadedin interfaceRoleStateChange- Overrides:
loadedin classSensorWithEntityFilters
-
spawned
- Specified by:
spawnedin interfaceRoleStateChange- Overrides:
spawnedin classSensorWithEntityFilters
-
unloaded
- Specified by:
unloadedin interfaceRoleStateChange- Overrides:
unloadedin classSensorWithEntityFilters
-
removed
- Specified by:
removedin interfaceRoleStateChange- Overrides:
removedin classSensorWithEntityFilters
-
teleported
- Specified by:
teleportedin interfaceRoleStateChange- Overrides:
teleportedin classSensorWithEntityFilters
-