Contents
Class SensorChargeBlockCollisions
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.SensorBase
com.hypixel.hytale.server.npc.corecomponents.combat.SensorChargeBlockCollisions
- All Implemented Interfaces:
RoleStateChange, Sensor, IAnnotatedComponent, IComponentExecutionControl
Matches when a preceding
BodyMotionCharge reports at least one block collision in the
current rail-step tick. The matching sensor exposes a BlockCollisionProvider so
downstream actions can iterate the per-tick hit list.-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSensorChargeBlockCollisions(BuilderSensorChargeBlockCollisions builder, BuilderSupport support) -
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) Methods inherited from class SensorBase
clearOnce, isTriggered, processDelay, setOnceMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface RoleStateChange
motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Constructor Details
-
SensorChargeBlockCollisions
public SensorChargeBlockCollisions(@Nonnull BuilderSensorChargeBlockCollisions builder, @Nonnull BuilderSupport support)
-
-
Method Details
-
loaded
-
matches
public boolean matches(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, double dt, @Nonnull Store<EntityStore> store) - Specified by:
matchesin interfaceSensor- Overrides:
matchesin classSensorBase
-
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
-
done
public void done()
-