From a0bce7197483a75308a8d900515e444bb8623ece Mon Sep 17 00:00:00 2001 From: Amnet Date: Fri, 20 Sep 2013 21:58:42 +0200 Subject: [PATCH] Fixing NPE with gem generation. --- common/biomesoplenty/biomes/BiomeGenAlps.java | 3 ++- common/biomesoplenty/biomes/BiomeGenAlpsBase.java | 3 ++- common/biomesoplenty/biomes/BiomeGenAlpsForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenArctic.java | 3 ++- common/biomesoplenty/biomes/BiomeGenBadlands.java | 3 ++- common/biomesoplenty/biomes/BiomeGenBambooForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenBirchForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenBorealForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenCanyon.java | 3 ++- common/biomesoplenty/biomes/BiomeGenCanyonRavine.java | 3 ++- common/biomesoplenty/biomes/BiomeGenChaparral.java | 3 ++- common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java | 3 ++- common/biomesoplenty/biomes/BiomeGenConiferousForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenConiferousForestSnow.java | 3 ++- common/biomesoplenty/biomes/BiomeGenCrag.java | 3 ++- common/biomesoplenty/biomes/BiomeGenDeadForestSnow.java | 3 ++- common/biomesoplenty/biomes/BiomeGenDeadSwamp.java | 3 ++- common/biomesoplenty/biomes/BiomeGenDeciduousForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenDunes.java | 3 ++- common/biomesoplenty/biomes/BiomeGenField.java | 3 ++- common/biomesoplenty/biomes/BiomeGenFieldForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenFrostForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenGarden.java | 3 ++- common/biomesoplenty/biomes/BiomeGenGlacier.java | 3 ++- common/biomesoplenty/biomes/BiomeGenGrassland.java | 3 ++- common/biomesoplenty/biomes/BiomeGenGrove.java | 3 ++- common/biomesoplenty/biomes/BiomeGenHeathland.java | 3 ++- common/biomesoplenty/biomes/BiomeGenHighland.java | 3 ++- common/biomesoplenty/biomes/BiomeGenHotSprings.java | 3 ++- common/biomesoplenty/biomes/BiomeGenIcyHills.java | 3 ++- common/biomesoplenty/biomes/BiomeGenJadeCliffs.java | 3 ++- common/biomesoplenty/biomes/BiomeGenLushSwamp.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMangrove.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMapleWoods.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMeadow.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMeadowForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMesa.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMoor.java | 3 ++- common/biomesoplenty/biomes/BiomeGenMountain.java | 3 ++- common/biomesoplenty/biomes/BiomeGenOasis.java | 3 ++- common/biomesoplenty/biomes/BiomeGenOrchard.java | 3 ++- common/biomesoplenty/biomes/BiomeGenOutback.java | 3 ++- common/biomesoplenty/biomes/BiomeGenPasture.java | 3 ++- common/biomesoplenty/biomes/BiomeGenPastureMeadow.java | 3 ++- common/biomesoplenty/biomes/BiomeGenPastureThin.java | 3 ++- common/biomesoplenty/biomes/BiomeGenPolar.java | 3 ++- common/biomesoplenty/biomes/BiomeGenPrairie.java | 3 ++- common/biomesoplenty/biomes/BiomeGenQuagmire.java | 3 ++- common/biomesoplenty/biomes/BiomeGenRainforest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenRedwoodForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSavanna.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSavannaPlateau.java | 3 ++- common/biomesoplenty/biomes/BiomeGenScrubland.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSeasonalForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSeasonalSpruceForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenShrubland.java | 3 ++- common/biomesoplenty/biomes/BiomeGenShrublandForest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSilkglades.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSludgepit.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSpruceWoods.java | 3 ++- common/biomesoplenty/biomes/BiomeGenSteppe.java | 3 ++- common/biomesoplenty/biomes/BiomeGenTemperateRainforest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenTimber.java | 3 ++- common/biomesoplenty/biomes/BiomeGenTimberThin.java | 3 ++- common/biomesoplenty/biomes/BiomeGenTropicalRainforest.java | 3 ++- common/biomesoplenty/biomes/BiomeGenTropics.java | 3 ++- common/biomesoplenty/biomes/BiomeGenTundra.java | 3 ++- common/biomesoplenty/biomes/BiomeGenWoodland.java | 3 ++- common/biomesoplenty/biomes/ocean/BiomeGenOceanAbyss.java | 3 ++- common/biomesoplenty/biomes/ocean/BiomeGenOceanCoral.java | 3 ++- common/biomesoplenty/biomes/ocean/BiomeGenOceanKelp.java | 3 ++- common/biomesoplenty/biomes/vanilla/BiomeGenForestNew.java | 3 ++- common/biomesoplenty/biomes/vanilla/BiomeGenHillsNew.java | 3 ++- common/biomesoplenty/biomes/vanilla/BiomeGenPlainsNew.java | 3 ++- common/biomesoplenty/biomes/vanilla/BiomeGenTaigaNew.java | 3 ++- 75 files changed, 150 insertions(+), 75 deletions(-) diff --git a/common/biomesoplenty/biomes/BiomeGenAlps.java b/common/biomesoplenty/biomes/BiomeGenAlps.java index ac3869088..44c212520 100644 --- a/common/biomesoplenty/biomes/BiomeGenAlps.java +++ b/common/biomesoplenty/biomes/BiomeGenAlps.java @@ -39,7 +39,8 @@ public class BiomeGenAlps extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenAlpsBase.java b/common/biomesoplenty/biomes/BiomeGenAlpsBase.java index a3bcefdf6..07f810b6c 100644 --- a/common/biomesoplenty/biomes/BiomeGenAlpsBase.java +++ b/common/biomesoplenty/biomes/BiomeGenAlpsBase.java @@ -38,7 +38,8 @@ public class BiomeGenAlpsBase extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenAlpsForest.java b/common/biomesoplenty/biomes/BiomeGenAlpsForest.java index 04e85cb75..07cc224d0 100644 --- a/common/biomesoplenty/biomes/BiomeGenAlpsForest.java +++ b/common/biomesoplenty/biomes/BiomeGenAlpsForest.java @@ -40,7 +40,8 @@ public class BiomeGenAlpsForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenArctic.java b/common/biomesoplenty/biomes/BiomeGenArctic.java index d00e05111..1291d80ae 100644 --- a/common/biomesoplenty/biomes/BiomeGenArctic.java +++ b/common/biomesoplenty/biomes/BiomeGenArctic.java @@ -37,7 +37,8 @@ public class BiomeGenArctic extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenBadlands.java b/common/biomesoplenty/biomes/BiomeGenBadlands.java index be557e0a7..532e4e930 100644 --- a/common/biomesoplenty/biomes/BiomeGenBadlands.java +++ b/common/biomesoplenty/biomes/BiomeGenBadlands.java @@ -45,7 +45,8 @@ public class BiomeGenBadlands extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenBambooForest.java b/common/biomesoplenty/biomes/BiomeGenBambooForest.java index ae9b46c85..8c4e175d4 100644 --- a/common/biomesoplenty/biomes/BiomeGenBambooForest.java +++ b/common/biomesoplenty/biomes/BiomeGenBambooForest.java @@ -41,7 +41,8 @@ public class BiomeGenBambooForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 6, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenBirchForest.java b/common/biomesoplenty/biomes/BiomeGenBirchForest.java index 2ae9418ff..5a0e6fdee 100644 --- a/common/biomesoplenty/biomes/BiomeGenBirchForest.java +++ b/common/biomesoplenty/biomes/BiomeGenBirchForest.java @@ -57,7 +57,8 @@ public class BiomeGenBirchForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenBorealForest.java b/common/biomesoplenty/biomes/BiomeGenBorealForest.java index 576834e41..159a70f4a 100644 --- a/common/biomesoplenty/biomes/BiomeGenBorealForest.java +++ b/common/biomesoplenty/biomes/BiomeGenBorealForest.java @@ -61,7 +61,8 @@ public class BiomeGenBorealForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenCanyon.java b/common/biomesoplenty/biomes/BiomeGenCanyon.java index 5587fd7c4..b31e9cc46 100644 --- a/common/biomesoplenty/biomes/BiomeGenCanyon.java +++ b/common/biomesoplenty/biomes/BiomeGenCanyon.java @@ -52,7 +52,8 @@ public class BiomeGenCanyon extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenCanyonRavine.java b/common/biomesoplenty/biomes/BiomeGenCanyonRavine.java index f9f2800b7..a75504eb3 100644 --- a/common/biomesoplenty/biomes/BiomeGenCanyonRavine.java +++ b/common/biomesoplenty/biomes/BiomeGenCanyonRavine.java @@ -52,7 +52,8 @@ public class BiomeGenCanyonRavine extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenChaparral.java b/common/biomesoplenty/biomes/BiomeGenChaparral.java index 8a3e19011..088b2c077 100644 --- a/common/biomesoplenty/biomes/BiomeGenChaparral.java +++ b/common/biomesoplenty/biomes/BiomeGenChaparral.java @@ -47,7 +47,8 @@ public class BiomeGenChaparral extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java b/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java index 8cb4a3e5b..8eff316ec 100644 --- a/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java +++ b/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java @@ -50,7 +50,8 @@ public class BiomeGenCherryBlossomGrove extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenConiferousForest.java b/common/biomesoplenty/biomes/BiomeGenConiferousForest.java index e1faf11b1..33a5efd0e 100644 --- a/common/biomesoplenty/biomes/BiomeGenConiferousForest.java +++ b/common/biomesoplenty/biomes/BiomeGenConiferousForest.java @@ -73,7 +73,8 @@ public class BiomeGenConiferousForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenConiferousForestSnow.java b/common/biomesoplenty/biomes/BiomeGenConiferousForestSnow.java index ec53829b9..6dd8780f6 100644 --- a/common/biomesoplenty/biomes/BiomeGenConiferousForestSnow.java +++ b/common/biomesoplenty/biomes/BiomeGenConiferousForestSnow.java @@ -41,7 +41,8 @@ public class BiomeGenConiferousForestSnow extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenCrag.java b/common/biomesoplenty/biomes/BiomeGenCrag.java index a194db0d2..52715fcbf 100644 --- a/common/biomesoplenty/biomes/BiomeGenCrag.java +++ b/common/biomesoplenty/biomes/BiomeGenCrag.java @@ -39,7 +39,8 @@ public class BiomeGenCrag extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 12, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenDeadForestSnow.java b/common/biomesoplenty/biomes/BiomeGenDeadForestSnow.java index 385ea6873..0ce27c60b 100644 --- a/common/biomesoplenty/biomes/BiomeGenDeadForestSnow.java +++ b/common/biomesoplenty/biomes/BiomeGenDeadForestSnow.java @@ -41,7 +41,8 @@ public class BiomeGenDeadForestSnow extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenDeadSwamp.java b/common/biomesoplenty/biomes/BiomeGenDeadSwamp.java index 1cc576d92..e5ddd6eb1 100644 --- a/common/biomesoplenty/biomes/BiomeGenDeadSwamp.java +++ b/common/biomesoplenty/biomes/BiomeGenDeadSwamp.java @@ -49,7 +49,8 @@ public class BiomeGenDeadSwamp extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 10, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenDeciduousForest.java b/common/biomesoplenty/biomes/BiomeGenDeciduousForest.java index 770315c9e..0db947f02 100644 --- a/common/biomesoplenty/biomes/BiomeGenDeciduousForest.java +++ b/common/biomesoplenty/biomes/BiomeGenDeciduousForest.java @@ -61,7 +61,8 @@ public class BiomeGenDeciduousForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenDunes.java b/common/biomesoplenty/biomes/BiomeGenDunes.java index a65910e9b..2709d8f6e 100644 --- a/common/biomesoplenty/biomes/BiomeGenDunes.java +++ b/common/biomesoplenty/biomes/BiomeGenDunes.java @@ -41,7 +41,8 @@ public class BiomeGenDunes extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenField.java b/common/biomesoplenty/biomes/BiomeGenField.java index 7e83ecf13..cf24782da 100644 --- a/common/biomesoplenty/biomes/BiomeGenField.java +++ b/common/biomesoplenty/biomes/BiomeGenField.java @@ -41,7 +41,8 @@ public class BiomeGenField extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenFieldForest.java b/common/biomesoplenty/biomes/BiomeGenFieldForest.java index 973923fea..df4c587de 100644 --- a/common/biomesoplenty/biomes/BiomeGenFieldForest.java +++ b/common/biomesoplenty/biomes/BiomeGenFieldForest.java @@ -52,7 +52,8 @@ public class BiomeGenFieldForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenFrostForest.java b/common/biomesoplenty/biomes/BiomeGenFrostForest.java index 422a9a311..da3e29fc2 100644 --- a/common/biomesoplenty/biomes/BiomeGenFrostForest.java +++ b/common/biomesoplenty/biomes/BiomeGenFrostForest.java @@ -39,7 +39,8 @@ public class BiomeGenFrostForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenGarden.java b/common/biomesoplenty/biomes/BiomeGenGarden.java index b497616f0..0f7f2d555 100644 --- a/common/biomesoplenty/biomes/BiomeGenGarden.java +++ b/common/biomesoplenty/biomes/BiomeGenGarden.java @@ -57,7 +57,8 @@ public class BiomeGenGarden extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenGlacier.java b/common/biomesoplenty/biomes/BiomeGenGlacier.java index 0f32418f2..37870f543 100644 --- a/common/biomesoplenty/biomes/BiomeGenGlacier.java +++ b/common/biomesoplenty/biomes/BiomeGenGlacier.java @@ -39,7 +39,8 @@ public class BiomeGenGlacier extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenGrassland.java b/common/biomesoplenty/biomes/BiomeGenGrassland.java index 60b502dbf..24f69ecc8 100644 --- a/common/biomesoplenty/biomes/BiomeGenGrassland.java +++ b/common/biomesoplenty/biomes/BiomeGenGrassland.java @@ -56,7 +56,8 @@ public class BiomeGenGrassland extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenGrove.java b/common/biomesoplenty/biomes/BiomeGenGrove.java index d51e8f2b7..cb1054762 100644 --- a/common/biomesoplenty/biomes/BiomeGenGrove.java +++ b/common/biomesoplenty/biomes/BiomeGenGrove.java @@ -64,7 +64,8 @@ public class BiomeGenGrove extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenHeathland.java b/common/biomesoplenty/biomes/BiomeGenHeathland.java index 0012715f3..723bd7181 100644 --- a/common/biomesoplenty/biomes/BiomeGenHeathland.java +++ b/common/biomesoplenty/biomes/BiomeGenHeathland.java @@ -44,7 +44,8 @@ public class BiomeGenHeathland extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenHighland.java b/common/biomesoplenty/biomes/BiomeGenHighland.java index 575a23b7f..6f7918fb1 100644 --- a/common/biomesoplenty/biomes/BiomeGenHighland.java +++ b/common/biomesoplenty/biomes/BiomeGenHighland.java @@ -36,7 +36,8 @@ public class BiomeGenHighland extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenHotSprings.java b/common/biomesoplenty/biomes/BiomeGenHotSprings.java index af60c6878..e44dd0d64 100644 --- a/common/biomesoplenty/biomes/BiomeGenHotSprings.java +++ b/common/biomesoplenty/biomes/BiomeGenHotSprings.java @@ -41,7 +41,8 @@ public class BiomeGenHotSprings extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 12, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenIcyHills.java b/common/biomesoplenty/biomes/BiomeGenIcyHills.java index 57c1ad6b3..1c8e40741 100644 --- a/common/biomesoplenty/biomes/BiomeGenIcyHills.java +++ b/common/biomesoplenty/biomes/BiomeGenIcyHills.java @@ -45,7 +45,8 @@ public class BiomeGenIcyHills extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenJadeCliffs.java b/common/biomesoplenty/biomes/BiomeGenJadeCliffs.java index 70cc71fa3..d6cbac8fd 100644 --- a/common/biomesoplenty/biomes/BiomeGenJadeCliffs.java +++ b/common/biomesoplenty/biomes/BiomeGenJadeCliffs.java @@ -38,7 +38,8 @@ public class BiomeGenJadeCliffs extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenLushSwamp.java b/common/biomesoplenty/biomes/BiomeGenLushSwamp.java index c9d6891fd..dd6f946e0 100644 --- a/common/biomesoplenty/biomes/BiomeGenLushSwamp.java +++ b/common/biomesoplenty/biomes/BiomeGenLushSwamp.java @@ -48,7 +48,8 @@ public class BiomeGenLushSwamp extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 10, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMangrove.java b/common/biomesoplenty/biomes/BiomeGenMangrove.java index d96e37340..713fb6e15 100644 --- a/common/biomesoplenty/biomes/BiomeGenMangrove.java +++ b/common/biomesoplenty/biomes/BiomeGenMangrove.java @@ -44,7 +44,8 @@ public class BiomeGenMangrove extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 12, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMapleWoods.java b/common/biomesoplenty/biomes/BiomeGenMapleWoods.java index c28cb6120..ef6808044 100644 --- a/common/biomesoplenty/biomes/BiomeGenMapleWoods.java +++ b/common/biomesoplenty/biomes/BiomeGenMapleWoods.java @@ -46,7 +46,8 @@ public class BiomeGenMapleWoods extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMeadow.java b/common/biomesoplenty/biomes/BiomeGenMeadow.java index b44b9d6c2..e4f4cdeab 100644 --- a/common/biomesoplenty/biomes/BiomeGenMeadow.java +++ b/common/biomesoplenty/biomes/BiomeGenMeadow.java @@ -47,7 +47,8 @@ public class BiomeGenMeadow extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMeadowForest.java b/common/biomesoplenty/biomes/BiomeGenMeadowForest.java index 5495506b4..ece545cb3 100644 --- a/common/biomesoplenty/biomes/BiomeGenMeadowForest.java +++ b/common/biomesoplenty/biomes/BiomeGenMeadowForest.java @@ -42,7 +42,8 @@ public class BiomeGenMeadowForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMesa.java b/common/biomesoplenty/biomes/BiomeGenMesa.java index aee00d7c3..3aab166ed 100644 --- a/common/biomesoplenty/biomes/BiomeGenMesa.java +++ b/common/biomesoplenty/biomes/BiomeGenMesa.java @@ -44,7 +44,8 @@ public class BiomeGenMesa extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMoor.java b/common/biomesoplenty/biomes/BiomeGenMoor.java index 826af1750..bbf949d8d 100644 --- a/common/biomesoplenty/biomes/BiomeGenMoor.java +++ b/common/biomesoplenty/biomes/BiomeGenMoor.java @@ -71,7 +71,8 @@ public class BiomeGenMoor extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenMountain.java b/common/biomesoplenty/biomes/BiomeGenMountain.java index 0fdc58737..fa8d93215 100644 --- a/common/biomesoplenty/biomes/BiomeGenMountain.java +++ b/common/biomesoplenty/biomes/BiomeGenMountain.java @@ -52,7 +52,8 @@ public class BiomeGenMountain extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenOasis.java b/common/biomesoplenty/biomes/BiomeGenOasis.java index 5bd969c89..a16635a29 100644 --- a/common/biomesoplenty/biomes/BiomeGenOasis.java +++ b/common/biomesoplenty/biomes/BiomeGenOasis.java @@ -50,7 +50,8 @@ public class BiomeGenOasis extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 6, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenOrchard.java b/common/biomesoplenty/biomes/BiomeGenOrchard.java index 8d9982610..a2c1fa177 100644 --- a/common/biomesoplenty/biomes/BiomeGenOrchard.java +++ b/common/biomesoplenty/biomes/BiomeGenOrchard.java @@ -46,7 +46,8 @@ public class BiomeGenOrchard extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenOutback.java b/common/biomesoplenty/biomes/BiomeGenOutback.java index 474568ec0..7885e3c2f 100644 --- a/common/biomesoplenty/biomes/BiomeGenOutback.java +++ b/common/biomesoplenty/biomes/BiomeGenOutback.java @@ -45,7 +45,8 @@ public class BiomeGenOutback extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenPasture.java b/common/biomesoplenty/biomes/BiomeGenPasture.java index bf2d2a5bd..b6596085f 100644 --- a/common/biomesoplenty/biomes/BiomeGenPasture.java +++ b/common/biomesoplenty/biomes/BiomeGenPasture.java @@ -37,7 +37,8 @@ public class BiomeGenPasture extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenPastureMeadow.java b/common/biomesoplenty/biomes/BiomeGenPastureMeadow.java index 2234998ad..345bc56c3 100644 --- a/common/biomesoplenty/biomes/BiomeGenPastureMeadow.java +++ b/common/biomesoplenty/biomes/BiomeGenPastureMeadow.java @@ -39,7 +39,8 @@ public class BiomeGenPastureMeadow extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenPastureThin.java b/common/biomesoplenty/biomes/BiomeGenPastureThin.java index f40bdaaa8..c0fa1ba09 100644 --- a/common/biomesoplenty/biomes/BiomeGenPastureThin.java +++ b/common/biomesoplenty/biomes/BiomeGenPastureThin.java @@ -39,7 +39,8 @@ public class BiomeGenPastureThin extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenPolar.java b/common/biomesoplenty/biomes/BiomeGenPolar.java index 1d2b475dc..689355a85 100644 --- a/common/biomesoplenty/biomes/BiomeGenPolar.java +++ b/common/biomesoplenty/biomes/BiomeGenPolar.java @@ -38,7 +38,8 @@ public class BiomeGenPolar extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenPrairie.java b/common/biomesoplenty/biomes/BiomeGenPrairie.java index 3ae8439ca..c37017d35 100644 --- a/common/biomesoplenty/biomes/BiomeGenPrairie.java +++ b/common/biomesoplenty/biomes/BiomeGenPrairie.java @@ -44,7 +44,8 @@ public class BiomeGenPrairie extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenQuagmire.java b/common/biomesoplenty/biomes/BiomeGenQuagmire.java index d6caf4217..3b5db2d0c 100644 --- a/common/biomesoplenty/biomes/BiomeGenQuagmire.java +++ b/common/biomesoplenty/biomes/BiomeGenQuagmire.java @@ -46,7 +46,8 @@ public class BiomeGenQuagmire extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 10, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenRainforest.java b/common/biomesoplenty/biomes/BiomeGenRainforest.java index ab191dc84..de9b7135e 100644 --- a/common/biomesoplenty/biomes/BiomeGenRainforest.java +++ b/common/biomesoplenty/biomes/BiomeGenRainforest.java @@ -48,7 +48,8 @@ public class BiomeGenRainforest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 6, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenRedwoodForest.java b/common/biomesoplenty/biomes/BiomeGenRedwoodForest.java index 6122ff3d7..bd1375789 100644 --- a/common/biomesoplenty/biomes/BiomeGenRedwoodForest.java +++ b/common/biomesoplenty/biomes/BiomeGenRedwoodForest.java @@ -57,7 +57,8 @@ public class BiomeGenRedwoodForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSavanna.java b/common/biomesoplenty/biomes/BiomeGenSavanna.java index aac2b2119..b60e1b05b 100644 --- a/common/biomesoplenty/biomes/BiomeGenSavanna.java +++ b/common/biomesoplenty/biomes/BiomeGenSavanna.java @@ -42,7 +42,8 @@ public class BiomeGenSavanna extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSavannaPlateau.java b/common/biomesoplenty/biomes/BiomeGenSavannaPlateau.java index f90786d60..d5623d4ea 100644 --- a/common/biomesoplenty/biomes/BiomeGenSavannaPlateau.java +++ b/common/biomesoplenty/biomes/BiomeGenSavannaPlateau.java @@ -42,7 +42,8 @@ public class BiomeGenSavannaPlateau extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenScrubland.java b/common/biomesoplenty/biomes/BiomeGenScrubland.java index cf04acd50..c7e99259c 100644 --- a/common/biomesoplenty/biomes/BiomeGenScrubland.java +++ b/common/biomesoplenty/biomes/BiomeGenScrubland.java @@ -40,7 +40,8 @@ public class BiomeGenScrubland extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSeasonalForest.java b/common/biomesoplenty/biomes/BiomeGenSeasonalForest.java index 113f5616c..895404104 100644 --- a/common/biomesoplenty/biomes/BiomeGenSeasonalForest.java +++ b/common/biomesoplenty/biomes/BiomeGenSeasonalForest.java @@ -65,7 +65,8 @@ public class BiomeGenSeasonalForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSeasonalSpruceForest.java b/common/biomesoplenty/biomes/BiomeGenSeasonalSpruceForest.java index fc5316b19..1e67ac763 100644 --- a/common/biomesoplenty/biomes/BiomeGenSeasonalSpruceForest.java +++ b/common/biomesoplenty/biomes/BiomeGenSeasonalSpruceForest.java @@ -65,7 +65,8 @@ public class BiomeGenSeasonalSpruceForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenShrubland.java b/common/biomesoplenty/biomes/BiomeGenShrubland.java index 745090e71..f0801473d 100644 --- a/common/biomesoplenty/biomes/BiomeGenShrubland.java +++ b/common/biomesoplenty/biomes/BiomeGenShrubland.java @@ -42,7 +42,8 @@ public class BiomeGenShrubland extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenShrublandForest.java b/common/biomesoplenty/biomes/BiomeGenShrublandForest.java index f475dea55..93cd2897d 100644 --- a/common/biomesoplenty/biomes/BiomeGenShrublandForest.java +++ b/common/biomesoplenty/biomes/BiomeGenShrublandForest.java @@ -42,7 +42,8 @@ public class BiomeGenShrublandForest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSilkglades.java b/common/biomesoplenty/biomes/BiomeGenSilkglades.java index 7f243dc92..acbeb3954 100644 --- a/common/biomesoplenty/biomes/BiomeGenSilkglades.java +++ b/common/biomesoplenty/biomes/BiomeGenSilkglades.java @@ -75,7 +75,8 @@ public class BiomeGenSilkglades extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 10, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSludgepit.java b/common/biomesoplenty/biomes/BiomeGenSludgepit.java index 9740053a6..10fb0328c 100644 --- a/common/biomesoplenty/biomes/BiomeGenSludgepit.java +++ b/common/biomesoplenty/biomes/BiomeGenSludgepit.java @@ -54,7 +54,8 @@ public class BiomeGenSludgepit extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 10, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSpruceWoods.java b/common/biomesoplenty/biomes/BiomeGenSpruceWoods.java index 5b8328e4f..12afaa1ca 100644 --- a/common/biomesoplenty/biomes/BiomeGenSpruceWoods.java +++ b/common/biomesoplenty/biomes/BiomeGenSpruceWoods.java @@ -53,7 +53,8 @@ public class BiomeGenSpruceWoods extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenSteppe.java b/common/biomesoplenty/biomes/BiomeGenSteppe.java index d9a51f362..49398af52 100644 --- a/common/biomesoplenty/biomes/BiomeGenSteppe.java +++ b/common/biomesoplenty/biomes/BiomeGenSteppe.java @@ -46,7 +46,8 @@ public class BiomeGenSteppe extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenTemperateRainforest.java b/common/biomesoplenty/biomes/BiomeGenTemperateRainforest.java index 0a7c24002..1bc551475 100644 --- a/common/biomesoplenty/biomes/BiomeGenTemperateRainforest.java +++ b/common/biomesoplenty/biomes/BiomeGenTemperateRainforest.java @@ -76,7 +76,8 @@ public class BiomeGenTemperateRainforest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenTimber.java b/common/biomesoplenty/biomes/BiomeGenTimber.java index 8bd9b553e..7f3286731 100644 --- a/common/biomesoplenty/biomes/BiomeGenTimber.java +++ b/common/biomesoplenty/biomes/BiomeGenTimber.java @@ -59,7 +59,8 @@ public class BiomeGenTimber extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenTimberThin.java b/common/biomesoplenty/biomes/BiomeGenTimberThin.java index 44ec70000..c9e33ba4b 100644 --- a/common/biomesoplenty/biomes/BiomeGenTimberThin.java +++ b/common/biomesoplenty/biomes/BiomeGenTimberThin.java @@ -59,7 +59,8 @@ public class BiomeGenTimberThin extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenTropicalRainforest.java b/common/biomesoplenty/biomes/BiomeGenTropicalRainforest.java index 1b8455877..651eb41e4 100644 --- a/common/biomesoplenty/biomes/BiomeGenTropicalRainforest.java +++ b/common/biomesoplenty/biomes/BiomeGenTropicalRainforest.java @@ -56,7 +56,8 @@ public class BiomeGenTropicalRainforest extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 6, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenTropics.java b/common/biomesoplenty/biomes/BiomeGenTropics.java index 5d0ead9e4..60988d16f 100644 --- a/common/biomesoplenty/biomes/BiomeGenTropics.java +++ b/common/biomesoplenty/biomes/BiomeGenTropics.java @@ -51,7 +51,8 @@ public class BiomeGenTropics extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 6, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenTundra.java b/common/biomesoplenty/biomes/BiomeGenTundra.java index bdf994325..096f2eb6c 100644 --- a/common/biomesoplenty/biomes/BiomeGenTundra.java +++ b/common/biomesoplenty/biomes/BiomeGenTundra.java @@ -42,7 +42,8 @@ public class BiomeGenTundra extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); } diff --git a/common/biomesoplenty/biomes/BiomeGenWoodland.java b/common/biomesoplenty/biomes/BiomeGenWoodland.java index dacc665e8..2c3979a74 100644 --- a/common/biomesoplenty/biomes/BiomeGenWoodland.java +++ b/common/biomesoplenty/biomes/BiomeGenWoodland.java @@ -35,7 +35,8 @@ public class BiomeGenWoodland extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/ocean/BiomeGenOceanAbyss.java b/common/biomesoplenty/biomes/ocean/BiomeGenOceanAbyss.java index f1f740952..22d036117 100644 --- a/common/biomesoplenty/biomes/ocean/BiomeGenOceanAbyss.java +++ b/common/biomesoplenty/biomes/ocean/BiomeGenOceanAbyss.java @@ -33,7 +33,8 @@ public class BiomeGenOceanAbyss extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 12, 2); } diff --git a/common/biomesoplenty/biomes/ocean/BiomeGenOceanCoral.java b/common/biomesoplenty/biomes/ocean/BiomeGenOceanCoral.java index 7ae73e912..b81e50987 100644 --- a/common/biomesoplenty/biomes/ocean/BiomeGenOceanCoral.java +++ b/common/biomesoplenty/biomes/ocean/BiomeGenOceanCoral.java @@ -36,7 +36,8 @@ public class BiomeGenOceanCoral extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 12, 2); } diff --git a/common/biomesoplenty/biomes/ocean/BiomeGenOceanKelp.java b/common/biomesoplenty/biomes/ocean/BiomeGenOceanKelp.java index c6b3a05d7..ed536a32f 100644 --- a/common/biomesoplenty/biomes/ocean/BiomeGenOceanKelp.java +++ b/common/biomesoplenty/biomes/ocean/BiomeGenOceanKelp.java @@ -36,7 +36,8 @@ public class BiomeGenOceanKelp extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 12, 2); } diff --git a/common/biomesoplenty/biomes/vanilla/BiomeGenForestNew.java b/common/biomesoplenty/biomes/vanilla/BiomeGenForestNew.java index f3fdc024b..c19525468 100644 --- a/common/biomesoplenty/biomes/vanilla/BiomeGenForestNew.java +++ b/common/biomesoplenty/biomes/vanilla/BiomeGenForestNew.java @@ -65,7 +65,8 @@ public class BiomeGenForestNew extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/vanilla/BiomeGenHillsNew.java b/common/biomesoplenty/biomes/vanilla/BiomeGenHillsNew.java index 68dd72446..f270b801e 100644 --- a/common/biomesoplenty/biomes/vanilla/BiomeGenHillsNew.java +++ b/common/biomesoplenty/biomes/vanilla/BiomeGenHillsNew.java @@ -50,7 +50,8 @@ public class BiomeGenHillsNew extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2); } diff --git a/common/biomesoplenty/biomes/vanilla/BiomeGenPlainsNew.java b/common/biomesoplenty/biomes/vanilla/BiomeGenPlainsNew.java index 9512f99c0..7ef5b423e 100644 --- a/common/biomesoplenty/biomes/vanilla/BiomeGenPlainsNew.java +++ b/common/biomesoplenty/biomes/vanilla/BiomeGenPlainsNew.java @@ -43,7 +43,8 @@ public class BiomeGenPlainsNew extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2); } diff --git a/common/biomesoplenty/biomes/vanilla/BiomeGenTaigaNew.java b/common/biomesoplenty/biomes/vanilla/BiomeGenTaigaNew.java index 621d71d44..3edf38d7a 100644 --- a/common/biomesoplenty/biomes/vanilla/BiomeGenTaigaNew.java +++ b/common/biomesoplenty/biomes/vanilla/BiomeGenTaigaNew.java @@ -53,7 +53,8 @@ public class BiomeGenTaigaNew extends BiomeGenBase int var9 = par4 + par2Random.nextInt(16); int var10 = par1World.getBlockId(var7, var8, var9); - if (Block.blocksList[var10].isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) + Block block = Block.blocksList[var10]; + if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) { par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 8, 2); }