Fix OreSim Crash

Fixes a crash when the seed's version is too old
(Ore.getConfig() returns null, resulting in a NullPointerException.)
This commit is contained in:
L3g73
2022-02-19 16:51:53 +01:00
committed by Cloudburst
parent 16c3db1820
commit e3f61a9931

View File

@@ -231,6 +231,12 @@ public class OreSim extends Module {
if (seed == null) return;
worldSeed = seed;
oreConfig = Ore.getConfig(Seeds.get().getSeed().version);
if (oreConfig == null) {
error("Ore Sim only works with seeds from version 1.14 or higher. (Current seed is from version " + Seeds.get().getSeed().version.toString() + ")");
this.toggle();
return;
}
chunkRenderers.clear();
if (mc.world != null && worldSeed != null) {
loadVisibleChunks();