Class DelayedSystem<ECS_TYPE>

java.lang.Object
com.hypixel.hytale.component.system.System<ECS_TYPE>
com.hypixel.hytale.component.system.tick.TickingSystem<ECS_TYPE>
com.hypixel.hytale.component.system.DelayedSystem<ECS_TYPE>
All Implemented Interfaces:
ISystem<ECS_TYPE>, TickableSystem<ECS_TYPE>
Direct Known Subclasses:
BlackboardSystems.TickingSystem, SleepNotificationSystem, StartSlumberSystem, StartVoidEventInFragmentSystem, TimePacketSystem, UpdateEntitySeedSystem, WorldConfigSaveSystem

public abstract class DelayedSystem<ECS_TYPE> extends TickingSystem<ECS_TYPE>
A ticking system with a configured interval that represents the frequency of the system
Since:
2020/11/23
  • Constructor Details

    • DelayedSystem

      public DelayedSystem(float intervalSec)
      Default Constructor for a DelayedSystem instance
      Parameters:
      intervalSec - The interval, in seconds, of this delayed system
  • Method Details

    • getResourceType

      @Nonnull public ResourceType<ECS_TYPE, com.hypixel.hytale.component.system.DelayedSystem.Data<ECS_TYPE>> getResourceType()
      Returns:
      the resource type of this system
    • getIntervalSec

      public float getIntervalSec()
      Returns:
      the interval, in seconds, of this system
    • tick

      public void tick(float dt, int systemIndex, @Nonnull Store<ECS_TYPE> store)
      Description copied from class: TickingSystem
      Required reading: CommandBuffer

      Called once per world tick.

      Specified by:
      tick in interface TickableSystem<ECS_TYPE>
      Specified by:
      tick in class TickingSystem<ECS_TYPE>
      Parameters:
      dt - The delta time in seconds.
      systemIndex - The index of this system, used for faster lookups in Store.
    • delayedTick

      public abstract void delayedTick(float dt, int systemIndex, @Nonnull Store<ECS_TYPE> store)
      A tick method called once every interval provided by the constructor DelayedSystem(float).
      Parameters:
      dt - The delta time in seconds since the last call to this method.
      systemIndex - The index of this system, used for faster lookups in Store.
      store - The store calling this method.