Contents
- Description
- Nested Class Summary
- Constructor Summary
- Method Summary
- Constructor Details
- TriggerContext(Ref, Store, TriggerEventType, VolumeEntry)
- TriggerContext(Ref, Store, TriggerEventType, VolumeEntry, List)
- TriggerContext(Ref, Store, TriggerEventType, VolumeEntry, List, Vector3d)
- TriggerContext(Ref, Store, TriggerEventType, VolumeEntry, List, Vector3d, List, Vector3d, String, InteractionType)
- Method Details
Class TriggerContext
java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.effect.TriggerContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHowresolveOrigin(EffectOrigin, Vector3d, TriggerContext.MissingActor)behaves when anENTITY/EVENTanchor has no position. -
Constructor Summary
ConstructorsConstructorDescriptionTriggerContext(Ref<EntityStore> entityRef, Store<EntityStore> store, TriggerEventType eventType, VolumeEntry volume) TriggerContext(Ref<EntityStore> entityRef, Store<EntityStore> store, TriggerEventType eventType, VolumeEntry volume, List<VolumeEntry> spatialVolumes) TriggerContext(Ref<EntityStore> entityRef, Store<EntityStore> store, TriggerEventType eventType, VolumeEntry volume, List<VolumeEntry> spatialVolumes, org.joml.Vector3d actorPosition) TriggerContext(Ref<EntityStore> entityRef, Store<EntityStore> store, TriggerEventType eventType, VolumeEntry volume, List<VolumeEntry> spatialVolumes, org.joml.Vector3d actorPosition, List<SignalTag> signalTags, org.joml.Vector3d blockPosition, String blockId, InteractionType interactionType) -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3dPosition of the triggering actor: the live transform when the ref is still valid, otherwise the snapshot captured when the effect was scheduled (so position-based effects still fire at the right place after the actor, e.g. a projectile, has despawned).org.joml.Vector3dorg.joml.Vector3dWhere the triggering event happened: the block position for block-driven events, otherwise the actor position.Tags carried by the signal that produced this context (empty for non-signal events).Volumes used for spatial queries (shape, bounds).getStore()org.joml.Vector3dresolveOrigin(EffectOrigin origin, org.joml.Vector3d offset, TriggerContext.MissingActor onMissing) Resolves the world position an effect should act at for the given anchor, addingoffset(which is the absolute position itself forEffectOrigin.WORLD_ABSOLUTE).
-
Constructor Details
-
TriggerContext
public TriggerContext(@Nullable Ref<EntityStore> entityRef, @Nonnull Store<EntityStore> store, @Nonnull TriggerEventType eventType, @Nonnull VolumeEntry volume) -
TriggerContext
public TriggerContext(@Nullable Ref<EntityStore> entityRef, @Nonnull Store<EntityStore> store, @Nonnull TriggerEventType eventType, @Nonnull VolumeEntry volume, @Nonnull List<VolumeEntry> spatialVolumes) -
TriggerContext
public TriggerContext(@Nullable Ref<EntityStore> entityRef, @Nonnull Store<EntityStore> store, @Nonnull TriggerEventType eventType, @Nonnull VolumeEntry volume, @Nonnull List<VolumeEntry> spatialVolumes, @Nullable org.joml.Vector3d actorPosition) -
TriggerContext
public TriggerContext(@Nullable Ref<EntityStore> entityRef, @Nonnull Store<EntityStore> store, @Nonnull TriggerEventType eventType, @Nonnull VolumeEntry volume, @Nonnull List<VolumeEntry> spatialVolumes, @Nullable org.joml.Vector3d actorPosition, @Nonnull List<SignalTag> signalTags, @Nullable org.joml.Vector3d blockPosition, @Nullable String blockId, @Nullable InteractionType interactionType)
-
-
Method Details
-
getEntityRef
-
getActorPosition
@Nullable public org.joml.Vector3d getActorPosition()Position of the triggering actor: the live transform when the ref is still valid, otherwise the snapshot captured when the effect was scheduled (so position-based effects still fire at the right place after the actor, e.g. a projectile, has despawned). Null when neither is available. -
getStore
-
getEventType
-
getVolume
-
getSpatialVolumes
Volumes used for spatial queries (shape, bounds). For group effects this is every member volume; otherwise it is a single-element list ofgetVolume(). -
getSignalTags
-
getBlockPosition
@Nullable public org.joml.Vector3d getBlockPosition() -
getEventPosition
@Nullable public org.joml.Vector3d getEventPosition()Where the triggering event happened: the block position for block-driven events, otherwise the actor position. Used to anchor a signal at its origin so receiver effects fire there rather than at the receiving volume's center. Null when the event carries no position. -
getBlockId
-
getInteractionType
-
resolveOrigin
@Nullable public org.joml.Vector3d resolveOrigin(@Nonnull EffectOrigin origin, @Nullable org.joml.Vector3d offset, @Nonnull TriggerContext.MissingActor onMissing) Resolves the world position an effect should act at for the given anchor, addingoffset(which is the absolute position itself forEffectOrigin.WORLD_ABSOLUTE). Returns null only when anENTITY/EVENTanchor has no position andonMissingisTriggerContext.MissingActor.SKIP.
-