9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-22 16:49:14 +00:00

Gently fail on new overworlds

This commit is contained in:
cyberpwn
2021-08-30 07:05:53 -04:00
parent 09edc78bdc
commit fbdb060e10
3 changed files with 18 additions and 11 deletions

View File

@@ -263,6 +263,12 @@ public class Iris extends VolmitPlugin implements Listener {
for (File j : dims.listFiles()) {
if (j.getName().endsWith(".json")) {
IrisDimension dim = data.getDimensionLoader().load(j.getName().split("\\Q.\\E")[0]);
if(dim == null)
{
continue;
}
Iris.verbose(" Checking Dimension " + dim.getLoadFile().getPath());
if (dim.installDataPack(() -> data, dpacks)) {
reboot = true;
@@ -358,6 +364,12 @@ public class Iris extends VolmitPlugin implements Listener {
if (j.getName().endsWith(".json")) {
IrisDimension dim = data.getDimensionLoader().load(j.getName().split("\\Q.\\E")[0]);
if(dim == null)
{
Iris.error("Failed to load " + j.getPath());
continue;
}
if (!verifyDataPackInstalled(dim)) {
bad = true;
}