Fix issues with getting item stacks, Closes #940 and fixes a bunch of other stuff

This commit is contained in:
modmuss50 2017-02-01 17:10:29 +00:00
parent d01b7d559d
commit 2b546b1991
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA

View file

@ -226,11 +226,16 @@ public class TechRebornWorldGen implements IWorldGenerator {
yPos = 10 + random.nextInt(ore.maxYHeight - ore.minYHeight); yPos = 10 + random.nextInt(ore.maxYHeight - ore.minYHeight);
zPos = chunkZ * 16 + random.nextInt(16); zPos = chunkZ * 16 + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos); BlockPos pos = new BlockPos(xPos, yPos, zPos);
if(ore.blockNiceName.equalsIgnoreCase("iridium")){ //Work around for iridium
world.setBlockState(pos, ore.state);
} else {
try { try {
worldGenMinable.generate(world, random, pos); worldGenMinable.generate(world, random, pos);
} catch (ArrayIndexOutOfBoundsException e) { } 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"); 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");
} }
}
} }
} }