From d3bd2bf70b903aa034f388bd4d3bc829355a5315 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Sat, 4 Jun 2016 11:14:34 +0100 Subject: [PATCH] Add a safety check to close #619 --- src/main/java/techreborn/world/TechRebornWorldGen.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/techreborn/world/TechRebornWorldGen.java b/src/main/java/techreborn/world/TechRebornWorldGen.java index 234de869f..82c28747e 100644 --- a/src/main/java/techreborn/world/TechRebornWorldGen.java +++ b/src/main/java/techreborn/world/TechRebornWorldGen.java @@ -227,7 +227,12 @@ public class TechRebornWorldGen implements IWorldGenerator yPos = 10 + random.nextInt(ore.maxYHeight - ore.minYHeight); zPos = chunkZ * 16 + random.nextInt(16); BlockPos pos = new BlockPos(xPos, yPos, zPos); - worldGenMinable.generate(world, random, pos); + try{ + worldGenMinable.generate(world, random, pos); + } catch (ArrayIndexOutOfBoundsException e){ + Core.logHelper.error("Something bad is happening during world gen the ore " + ore.blockNiceName + " caused a crash when generating. Report this to the TechReborn devs with a log"); + } + } } }