mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix dim loading
This commit is contained in:
parent
ff825b85aa
commit
6e47e4bcd2
@ -84,7 +84,6 @@ public class ProjectManager
|
||||
return v;
|
||||
});
|
||||
|
||||
Iris.warn("I COUNT " + vv);
|
||||
return vv;
|
||||
}
|
||||
|
||||
|
@ -121,22 +121,44 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
}
|
||||
|
||||
if (hint == null) {
|
||||
throw new RuntimeException("Cannot find iris dimension data for world: " + world.getName() + "! FAILED");
|
||||
Iris.error("Cannot find iris dimension data for world: " + world.getName() + "! Assuming overworld!");
|
||||
hint = "overworld";
|
||||
}
|
||||
|
||||
dim = IrisDataManager.loadAnyDimension(hint);
|
||||
|
||||
if (dim == null) {
|
||||
Iris.proj.downloadSearch(new MortarSender(Bukkit.getConsoleSender(), Iris.instance.getTag()), hint, false);
|
||||
dim = IrisDataManager.loadAnyDimension(hint);
|
||||
|
||||
if(dim == null)
|
||||
{
|
||||
throw new RuntimeException("Cannot find dimension: " + hint);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Iris.info("Download pack: " + hint);
|
||||
}
|
||||
}
|
||||
|
||||
if (production) {
|
||||
dim = new IrisDataManager(getDataFolder(world)).getDimensionLoader().load(dim.getLoadKey());
|
||||
IrisDimension od = dim;
|
||||
dim = new IrisDataManager(getDataFolder(world)).getDimensionLoader().load(od.getLoadKey());
|
||||
|
||||
if (dim == null) {
|
||||
Iris.info("Installing Iris pack " + od.getName() + " into world " + world.getName() + "...");
|
||||
Iris.proj.installIntoWorld(new MortarSender(Bukkit.getConsoleSender(), Iris.instance.getTag()), od.getLoadKey(), world.getWorldFolder());
|
||||
dim = new IrisDataManager(getDataFolder(world)).getDimensionLoader().load(od.getLoadKey());
|
||||
|
||||
if(dim == null)
|
||||
{
|
||||
throw new RuntimeException("Cannot find dimension: " + hint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Iris.info(world.getName() + " is configured to generate " + dim.getName() + "!");
|
||||
|
||||
return dim;
|
||||
}
|
||||
@ -419,9 +441,13 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
public void close() {
|
||||
J.car(art);
|
||||
getComposite().close();
|
||||
|
||||
if(isStudio())
|
||||
{
|
||||
IrisWorlds.evacuate(getComposite().getWorld());
|
||||
Bukkit.unloadWorld(getComposite().getWorld(), !isStudio());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClosed() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user