mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-02 07:56:48 +00:00
catch getEngineData NullPointer
This commit is contained in:
parent
68ad206252
commit
f9cb107728
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user