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