Class WorldConfigSaveSystem

All Implemented Interfaces:
ISystem<EntityStore>, TickableSystem<EntityStore>

public class WorldConfigSaveSystem extends DelayedSystem<EntityStore>
A delayed system that handles performing periodic saves of the world resources and configuration.
  • Constructor Details

    • WorldConfigSaveSystem

      public WorldConfigSaveSystem()
      Default Constructor of a WorldConfigSaveSystem instance.
  • Method Details

    • delayedTick

      public void delayedTick(float dt, int systemIndex, @Nonnull Store<EntityStore> store)
      Description copied from class: DelayedSystem
      A tick method called once every interval provided by the constructor DelayedSystem(float).
      Specified by:
      delayedTick in class DelayedSystem<EntityStore>
      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.
    • saveWorldConfigAndResources

      @Nonnull public static CompletableFuture<Void> saveWorldConfigAndResources(@Nonnull World world)
      Saves a WorldConfig (if able to), and the world's resources. Does NOT save chunks.
      Parameters:
      world - The world to save
      Returns:
      An uncompleted CompletableFuture to save all resources and world config