Contents
Class NullSensor
java.lang.Object
com.hypixel.hytale.server.npc.instructions.NullSensor
- All Implemented Interfaces:
RoleStateChange, Sensor, IAnnotatedComponent, IComponentExecutionControl
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintgetIndex()voidgetInfo(ExecutionSupport executionSupport, ComponentInfo holder) Populates the ComponentInfo holder with any relevant information relating to this particular componentGet access to sensor info result if the sensor supports this in principle.booleanbooleanmatches(Ref<EntityStore> ref, ExecutionSupport executionSupport, double dt, Store<EntityStore> store) booleanprocessDelay(float dt) Tick down the internal delay on this core componentvoidsetContext(IAnnotatedComponent parent, int index) voidsetOnce()Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getLabelMethods inherited from interface RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Constructor Details
-
NullSensor
public NullSensor()
-
-
Method Details
-
matches
public boolean matches(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, double dt, @Nonnull Store<EntityStore> store) -
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.
- Specified by:
getSensorInfoin interfaceSensor- Returns:
- InfoProvider instance if the sensor is capable of returning information else null
-
processDelay
public boolean processDelay(float dt) Description copied from interface:IComponentExecutionControlTick down the internal delay on this core component- Specified by:
processDelayin interfaceIComponentExecutionControl- Parameters:
dt- the tick duration- Returns:
- whether this component has finished processing its internal delay
-
clearOnce
public void clearOnce()- Specified by:
clearOncein interfaceIComponentExecutionControl
-
setOnce
public void setOnce()- Specified by:
setOncein interfaceIComponentExecutionControl
-
isTriggered
public boolean isTriggered()- Specified by:
isTriggeredin interfaceIComponentExecutionControl
-
getInfo
Description copied from interface:IAnnotatedComponentPopulates the ComponentInfo holder with any relevant information relating to this particular component- Specified by:
getInfoin interfaceIAnnotatedComponent- Parameters:
executionSupport- per-execution contextholder- the ComponentInfo instance to populate
-
setContext
- Specified by:
setContextin interfaceIAnnotatedComponent
-
getParent
- Specified by:
getParentin interfaceIAnnotatedComponent
-
getIndex
public int getIndex()- Specified by:
getIndexin interfaceIAnnotatedComponent
-