Contents
Class ChunkMigrations
java.lang.Object
com.hypixel.hytale.server.core.modules.migrations.ChunkMigrations
Runs registered migration systems against a chunk holder loaded outside of the
normal world loading pipeline (e.g. converting between storage backends or
migrating instance worlds).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe registry data and stores captured up front, soChunkMigrations.Snapshot.migrate(Holder)can run on a thread other than the store thread (for example a storage IO thread). -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanmigrate(Holder<ChunkStore> holder, ComponentRegistry.Data<ChunkStore> chunkData, Store<ChunkStore> chunkStore, ComponentRegistry.Data<EntityStore> entityData, Store<EntityStore> entityStore) Runs the chunk column, block, section, and (if available) entity migration systems against the given chunk holder.static booleanmigrateSections(Iterable<Holder<ChunkStore>> sections, ComponentRegistry.Data<ChunkStore> chunkData, Store<ChunkStore> chunkStore, ComponentRegistry.Data<EntityStore> entityData, Store<EntityStore> entityStore) Runs the block, section, and (if available) entity migration systems against section holders.
-
Method Details
-
migrate
public static boolean migrate(@Nonnull Holder<ChunkStore> holder, @Nonnull ComponentRegistry.Data<ChunkStore> chunkData, @Nonnull Store<ChunkStore> chunkStore, @Nullable ComponentRegistry.Data<EntityStore> entityData, @Nullable Store<EntityStore> entityStore) Runs the chunk column, block, section, and (if available) entity migration systems against the given chunk holder. The pre-fetched registry data is captured by the caller so the migration can run on threads other than the store thread.- Parameters:
holder- The chunk column holder to migrate.chunkData- A snapshot of the chunk component registry data.chunkStore- The chunkStoremigration systems should run against.entityData- A snapshot of the entity component registry data, ornullto skip entity migrations.entityStore- The entityStoreentity migration systems should run against, ornullto skip entity migrations.- Returns:
trueif any migration system ran on the holder, indicating the holder should be re-saved.
-
migrateSections
public static boolean migrateSections(@Nonnull Iterable<Holder<ChunkStore>> sections, @Nonnull ComponentRegistry.Data<ChunkStore> chunkData, @Nonnull Store<ChunkStore> chunkStore, @Nullable ComponentRegistry.Data<EntityStore> entityData, @Nullable Store<EntityStore> entityStore) Runs the block, section, and (if available) entity migration systems against section holders.migrate(Holder, ComponentRegistry.Data, Store, ComponentRegistry.Data, Store)calls this for a column's sections; cubic sections loaded on their own pass through it directly.- Returns:
trueif any migration system ran, indicating the sections should be re-saved.
-