Contents
Class EntitySavingSystem
java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.tick.TickingSystem<EntityStore>
com.hypixel.hytale.server.core.entity.EntitySavingSystem
- All Implemented Interfaces:
ISystem<EntityStore>, RunWhenPausedSystem<EntityStore>, TickableSystem<EntityStore>
public class EntitySavingSystem
extends TickingSystem<EntityStore>
implements RunWhenPausedSystem<EntityStore>
A ticking system that drives per-entity saves on cubic chunk savers.
For each entity whose Dirty component has dirty set (and is not already saving)
this system calls IChunkSaver.Cubic.saveEntity(UUID, Store, Ref). Non-cubic savers are no-ops here;
their entities are serialized as part of the chunk column save.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidflushAllDirty(World world, IChunkSaver.Cubic cubic, ChunkSavingSystems.Data data, Executor completionExecutor) Drains every dirty entity in the world's entity store via the supplied cubic saver.voidtick(float dt, int systemIndex, Store<EntityStore> store) Required reading:CommandBufferMethods inherited from class System
getComponentRegistrations, getResourceRegistrations, registerResource, registerResourceMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getGroup, onSystemRegistered, onSystemUnregistered
-
Constructor Details
-
EntitySavingSystem
public EntitySavingSystem()
-
-
Method Details
-
getDependencies
- Specified by:
getDependenciesin interfaceISystem<EntityStore>
-
tick
Description copied from class:TickingSystem- Specified by:
tickin interfaceTickableSystem<EntityStore>- Specified by:
tickin classTickingSystem<EntityStore>- Parameters:
dt- The delta time in seconds.systemIndex- The index of this system, used for faster lookups inStore.
-
flushAllDirty
public static void flushAllDirty(@Nonnull World world, @Nonnull IChunkSaver.Cubic cubic, @Nonnull ChunkSavingSystems.Data data, @Nullable Executor completionExecutor) Drains every dirty entity in the world's entity store via the supplied cubic saver. Used by the shutdown / world-removal flush inChunkSavingSystems.saveChunksInWorld(Store, Executor)where the tick driver isn't running. Blocks per-entity onChunkSavingSystems.Data.awaitInFlightCapacity(); save cooldowns are ignored. Entities already saved through a queued column / section save are skipped because that path consumed their dirty flag.
-