Contents
Interface Sensor
- All Superinterfaces:
IAnnotatedComponent, IComponentExecutionControl, RoleStateChange
- All Known Implementing Classes:
NullSensor, SensorAdjustPosition, SensorAge, SensorAlarm, SensorAnd, SensorAnimation, SensorAny, SensorBase, SensorBeacon, SensorBlock, SensorBlockChange, SensorBlockType, SensorCanInteract, SensorCanPlace, SensorChargeBlockCollisions, SensorChargeEntityCollisions, SensorChargeState, SensorCombatActionEvaluator, SensorCount, SensorDamage, SensorDroppedItem, SensorEntity, SensorEntityBase, SensorEntityEvent, SensorEval, SensorEvent, SensorFlag, SensorFlockCombatDamage, SensorFlockLeader, SensorGameFlag, SensorHasHostileTargetMemory, SensorHasInteracted, SensorHasTask, SensorInAir, SensorInflictedDamage, SensorInteractionContext, SensorInWater, SensorIsBackingAway, SensorIsBusy, SensorKill, SensorLeash, SensorLight, SensorMany, SensorMotionController, SensorNav, SensorNot, SensorOnGround, SensorOr, SensorPath, SensorPlayer, SensorPoints, SensorProjectToGround, SensorRandom, SensorReadPosition, SensorSearchRay, SensorSelf, SensorState, SensorSwitch, SensorTarget, SensorTime, SensorTimer, SensorTransformBase, SensorValueProviderWrapper, SensorWeather, SensorWithEntityFilters
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddone()Get access to sensor info result if the sensor supports this in principle.booleanmatches(Ref<EntityStore> ref, ExecutionSupport executionSupport, double dt, Store<EntityStore> store) Methods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface IComponentExecutionControl
clearOnce, isTriggered, processDelay, setOnceMethods inherited from interface RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
NULL
-
-
Method Details
-
matches
boolean matches(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, double dt, @Nonnull Store<EntityStore> store) -
done
default void done() -
getSensorInfo
Get 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
-