mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 06:41:08 +00:00
catch getEngineData NullPointer
This commit is contained in:
@@ -251,7 +251,7 @@ public class IrisEngine implements Engine {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IrisEngineData getEngineData() {
|
public IrisEngineData getEngineData() {
|
||||||
return engineData.aquire(() -> {
|
var ret = engineData.aquire(() -> {
|
||||||
//TODO: Method this file
|
//TODO: Method this file
|
||||||
File f = new File(getWorld().worldFolder(), "iris/engine-data/" + getDimension().getLoadKey() + ".json");
|
File f = new File(getWorld().worldFolder(), "iris/engine-data/" + getDimension().getLoadKey() + ".json");
|
||||||
|
|
||||||
@@ -279,6 +279,11 @@ public class IrisEngine implements Engine {
|
|||||||
|
|
||||||
return new IrisEngineData();
|
return new IrisEngineData();
|
||||||
});
|
});
|
||||||
|
if (ret == null) {
|
||||||
|
Iris.error("Failed to load Engine Data! (How did this happen?)");
|
||||||
|
return new IrisEngineData();
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user