Class VolumeEntry

java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.manager.VolumeEntry

public class VolumeEntry extends Object
Runtime and serialized state for one trigger volume. The persisted fields describe the volume's shape, effects, grouping, targeting, and cooldown configuration; the transient collections below track the entity lifecycle while the world is ticking.

trackedEntities is rebuilt every tick from the spatial query. Activation sets record entities that passed the ENTER/TICK gate, rejection sets keep TICK rejection effects one-shot during a continuous stay, and pending sets prevent duplicate delayed gates/effects from being queued. All per-entity runtime state is cleared on EXIT by clearEntityRuntimeState(UUID).

  • Field Details

  • Constructor Details

  • Method Details

    • setId

      public void setId(@Nonnull String volumeId)
    • setWorldName

      public void setWorldName(@Nonnull String worldName)
    • getId

      @Nonnull public String getId()
    • getName

      @Nullable public String getName()
    • setName

      public void setName(@Nullable String name)
    • getWorldName

      @Nonnull public String getWorldName()
    • getPosition

      @Nonnull public org.joml.Vector3d getPosition()
    • setPosition

      public void setPosition(@Nonnull org.joml.Vector3d position)
    • getShape

      @Nonnull public TriggerVolumeShape getShape()
    • setShape

      public void setShape(@Nonnull TriggerVolumeShape shape)
    • getEffects

      @Nonnull public List<TriggerEffect> getEffects()
    • getConditions

      @Nonnull public List<TriggerCondition> getConditions()
    • getRejectionEffects

      @Nonnull public List<TriggerEffect> getRejectionEffects()
    • getRules

      @Nonnull public List<TriggerRule> getRules()
    • isRulesActive

      public boolean isRulesActive()
    • setRulesActive

      public void setRulesActive(boolean rulesActive)
    • getConditionTiming

      @Nonnull public ConditionTiming getConditionTiming()
    • setConditionTiming

      public void setConditionTiming(@Nonnull ConditionTiming conditionTiming)
    • getRejectionDelayMode

      @Nonnull public RejectionDelayMode getRejectionDelayMode()
    • setRejectionDelayMode

      public void setRejectionDelayMode(@Nonnull RejectionDelayMode rejectionDelayMode)
    • getTargetTypes

      @Nonnull public Set<EntityTargetType> getTargetTypes()
    • getProjectileSource

      @Nonnull public ProjectileSource getProjectileSource()
    • setProjectileSource

      public void setProjectileSource(@Nonnull ProjectileSource projectileSource)
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • isKeepLoaded

      public boolean isKeepLoaded()
    • setKeepLoaded

      public void setKeepLoaded(boolean keepLoaded)
    • isRotateEffectsOnPaste

      public boolean isRotateEffectsOnPaste()
    • setRotateEffectsOnPaste

      public void setRotateEffectsOnPaste(boolean rotateEffectsOnPaste)
    • isFromWorldGen

      public boolean isFromWorldGen()
    • setFromWorldGen

      public void setFromWorldGen(boolean fromWorldGen)
    • isCancelDelayedEffectsOnExit

      public boolean isCancelDelayedEffectsOnExit()
    • setCancelDelayedEffectsOnExit

      public void setCancelDelayedEffectsOnExit(boolean cancelDelayedEffectsOnExit)
    • getActivationDelay

      public float getActivationDelay()
    • setActivationDelay

      public void setActivationDelay(float activationDelay)
    • getCooldown

      public float getCooldown()
    • setCooldown

      public void setCooldown(float cooldown)
    • getCooldownMode

      @Nonnull public CooldownMode getCooldownMode()
    • setCooldownMode

      public void setCooldownMode(@Nonnull CooldownMode cooldownMode)
    • isOnCooldown

      public boolean isOnCooldown(@Nonnull UUID entityUuid, long nowNanos)
      Returns whether this volume is still cooling down for the given entity. Expired per-entity cooldown entries are evicted here so they don't accumulate forever.
    • recordActivation

      public void recordActivation(@Nonnull UUID entityUuid, long nowNanos)
      Records the timestamp used by cooldown checks after activation. Volumes without a cooldown intentionally leave no bookkeeping behind.
    • isPendingDestroy

      public boolean isPendingDestroy()
    • markPendingDestroy

      public void markPendingDestroy()
    • getExpiresAt

      @Nullable public Instant getExpiresAt()
    • setExpiresAt

      public void setExpiresAt(@Nullable Instant expiresAt)
    • isExpired

      public boolean isExpired(@Nonnull Instant now)
      Returns whether this volume has an expiry that has elapsed as of now. Volumes without an expiry never report as expired.
    • getEffectAssetRef

      @Nullable public String getEffectAssetRef()
    • setEffectAssetRef

      public void setEffectAssetRef(@Nullable String effectAssetRef)
    • getGroupId

      @Nullable public String getGroupId()
    • setGroupId

      public void setGroupId(@Nullable String groupId)
    • getColor

      @Nullable public org.joml.Vector3f getColor()
    • setColor

      public void setColor(@Nullable org.joml.Vector3f color)
    • getRawTags

      @Nonnull public Map<String,String> getRawTags()
    • setTags

      public void setTags(@Nonnull Map<String,String> tags)
    • getExpandedTagIndexes

      @Nonnull public it.unimi.dsi.fastutil.ints.IntSet getExpandedTagIndexes()
    • setExpandedTagIndexes

      public void setExpandedTagIndexes(@Nonnull it.unimi.dsi.fastutil.ints.IntSet expandedTagIndexes)
    • hasTag

      public boolean hasTag(int tagIndex)
    • getTrackedEntities

      @Nonnull public Map<UUID, Ref<EntityStore>> getTrackedEntities()
    • getLastFireTimes

      @Nonnull public it.unimi.dsi.fastutil.objects.Object2LongMap<VolumeEntry.EffectEntityKey> getLastFireTimes()
    • isVolumeActivated

      public boolean isVolumeActivated(int entry, @Nonnull UUID entityUuid)
    • markVolumeActivated

      public void markVolumeActivated(int entry, @Nonnull UUID entityUuid)
    • markVolumeActivationPending

      public boolean markVolumeActivationPending(int entry, @Nonnull UUID entityUuid)
    • clearVolumeActivationPending

      public void clearVolumeActivationPending(int entry, @Nonnull UUID entityUuid)
    • markVolumeTickRejectionFired

      public boolean markVolumeTickRejectionFired(int entry, @Nonnull UUID entityUuid)
    • isGroupActivated

      public boolean isGroupActivated(@Nonnull String groupId, int entry, @Nonnull UUID entityUuid)
    • markGroupActivated

      public void markGroupActivated(@Nonnull String groupId, int entry, @Nonnull UUID entityUuid)
    • markGroupActivationPending

      public boolean markGroupActivationPending(@Nonnull String groupId, int entry, @Nonnull UUID entityUuid)
    • clearGroupActivationPending

      public void clearGroupActivationPending(@Nonnull String groupId, int entry, @Nonnull UUID entityUuid)
    • clearGroupActivationState

      public void clearGroupActivationState(@Nonnull String groupId)
    • markGroupTickRejectionFired

      public boolean markGroupTickRejectionFired(@Nonnull String groupId, int entry, @Nonnull UUID entityUuid)
    • markDelayedEffectPending

      public boolean markDelayedEffectPending(@Nonnull VolumeEntry.EffectEntityKey key)
    • clearDelayedEffectPending

      public void clearDelayedEffectPending(@Nonnull VolumeEntry.EffectEntityKey key)
    • clearEntityRuntimeState

      public void clearEntityRuntimeState(@Nonnull UUID entityUuid)