mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-08-27 04:37:47 +00:00
a
This commit is contained in:
@@ -208,7 +208,9 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
}
|
||||
spawnChunks.complete(INMS.get().getSpawnChunkCount(world));
|
||||
BukkitPlatform.volmitPlugin().unregisterListener(this);
|
||||
IrisWorlds.get().put(WorldIdentity.serialize(world), dimensionKey);
|
||||
if (shouldPersistWorldRegistration(studio)) {
|
||||
IrisWorlds.get().put(WorldIdentity.serialize(world), dimensionKey);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -310,6 +312,10 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
: IrisEngine.InitializationMode.STUDIO;
|
||||
}
|
||||
|
||||
static boolean shouldPersistWorldRegistration(boolean studio) {
|
||||
return !studio;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public EngineTarget getTarget() {
|
||||
|
||||
+6
@@ -49,4 +49,10 @@ public class BukkitChunkGeneratorInitializationModeTest {
|
||||
assertFalse(BukkitChunkGenerator.shouldRunStudioHotload(true, false, true));
|
||||
assertTrue(BukkitChunkGenerator.shouldRunStudioHotload(true, false, false));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void transientStudioWorldsAreNotPersisted() {
|
||||
assertFalse(BukkitChunkGenerator.shouldPersistWorldRegistration(true));
|
||||
assertTrue(BukkitChunkGenerator.shouldPersistWorldRegistration(false));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user