World Manager Seam

This commit is contained in:
Brian Neumann-Fopiano
2026-06-11 20:35:46 -04:00
parent a3d7269a99
commit 6b24105640
3 changed files with 33 additions and 2 deletions
@@ -18,6 +18,10 @@
package art.arcane.iris;
import art.arcane.iris.engine.IrisWorldManager;
import art.arcane.iris.engine.framework.EngineWorldManagerProvider;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonParser;
@@ -592,6 +596,11 @@ public class Iris extends VolmitPlugin implements Listener, ReloadAware {
tickets = new ChunkTickets();
linkMultiverseCore = new MultiverseCoreLink();
IrisServices.register(MultiverseCoreLink.class, linkMultiverseCore);
IrisServices.register(EngineWorldManagerProvider.class, (EngineWorldManagerProvider) (Engine engine) -> {
IrisWorldManager manager = new IrisWorldManager(engine);
manager.startManager();
return manager;
});
IrisServices.register(art.arcane.iris.core.runtime.WorldDeletionQueue.class, (art.arcane.iris.core.runtime.WorldDeletionQueue) Iris::queueWorldDeletionOnStartup);
settingsFile = getDataFile("settings.json");
configHotloadEngine = new ConfigHotloadEngine(
@@ -244,9 +244,8 @@ public class IrisEngine implements Engine {
setupMode();
IrisLogging.debug("[IrisEngine timing] setupMode=" + (M.ms() - t0) + "ms");
t0 = M.ms();
IrisWorldManager manager = new IrisWorldManager(this);
EngineWorldManager manager = IrisServices.get(EngineWorldManagerProvider.class).create(this);
worldManager = manager;
manager.startManager();
IrisLogging.debug("[IrisEngine timing] IrisWorldManager=" + (M.ms() - t0) + "ms");
J.a(this::computeBiomeMaxes);
J.a(() -> {
@@ -0,0 +1,23 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.engine.framework;
public interface EngineWorldManagerProvider {
EngineWorldManager create(Engine engine);
}