Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- done()
- registerWithSupport(ExecutionSupport)
- motionControllerChanged(Ref, NPCEntity, MotionController, ComponentAccessor)
- loaded(ExecutionSupport)
- spawned(ExecutionSupport)
- unloaded(ExecutionSupport)
- removed(ExecutionSupport)
- teleported(ExecutionSupport, World, World)
- getSensorInfo()
- componentCount()
- getComponent(int)
- setContext(IAnnotatedComponent, int)
Class SensorMany
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.SensorBase
com.hypixel.hytale.server.npc.corecomponents.utility.SensorMany
- All Implemented Interfaces:
RoleStateChange, Sensor, IAnnotatedComponent, IAnnotatedComponentCollection, IComponentExecutionControl
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSensorMany(BuilderSensorMany builder, BuilderSupport support, List<Sensor> sensors) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of components aggregatedvoiddone()getComponent(int index) Returns the annotated component at the given index, or null if the component at said index is not annotatedGet access to sensor info result if the sensor supports this in principle.voidloaded(ExecutionSupport executionSupport) voidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(ExecutionSupport executionSupport) voidremoved(ExecutionSupport executionSupport) voidsetContext(IAnnotatedComponent parent, int index) voidspawned(ExecutionSupport executionSupport) voidteleported(ExecutionSupport executionSupport, World from, World to) voidunloaded(ExecutionSupport executionSupport) Methods inherited from class SensorBase
clearOnce, isTriggered, matches, 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
-
SensorMany
public SensorMany(@Nonnull BuilderSensorMany builder, @Nonnull BuilderSupport support, @Nonnull List<Sensor> sensors)
-
-
Method Details
-
done
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) - Specified by:
motionControllerChangedin interfaceRoleStateChange
-
loaded
- Specified by:
loadedin interfaceRoleStateChange
-
spawned
- Specified by:
spawnedin interfaceRoleStateChange
-
unloaded
- Specified by:
unloadedin interfaceRoleStateChange
-
removed
- Specified by:
removedin interfaceRoleStateChange
-
teleported
- Specified by:
teleportedin interfaceRoleStateChange
-
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
-
componentCount
public int componentCount()Description copied from interface:IAnnotatedComponentCollectionReturns the number of components aggregated- Specified by:
componentCountin interfaceIAnnotatedComponentCollection- Returns:
- the number of components aggregated
-
getComponent
Description copied from interface:IAnnotatedComponentCollectionReturns the annotated component at the given index, or null if the component at said index is not annotated- Specified by:
getComponentin interfaceIAnnotatedComponentCollection- Parameters:
index- the index to fetch- Returns:
- the annotated component, or null if the component at the index is not annotated
-
setContext
- Specified by:
setContextin interfaceIAnnotatedComponent- Overrides:
setContextin classAnnotatedComponentBase
-