diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 58242a7e..30718ed0 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -97,7 +97,6 @@ public class BuildCraftEnergy extends BuildCraftMod { public static Block blockOil; public static Block blockFuel; public static Block blockRedPlasma; - public static Block blockEnergyConverter; public static Item bucketOil; public static Item bucketFuel; public static Item bucketRedPlasma; @@ -366,12 +365,6 @@ public class BuildCraftEnergy extends BuildCraftMod { CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), "www", " g ", "GpG", 'w', Items.iron_ingot, 'g', Blocks.glass, 'G', BuildCraftCore.ironGearItem, 'p', Blocks.piston); - - if (blockEnergyConverter != null) { - CoreProxy.proxy.addCraftingRecipe(new ItemStack(blockEnergyConverter, 1), "rcr", "sgs", "rcr", - 'r', Items.redstone, 'c', BuildCraftTransport.pipePowerCobblestone, - 's', BuildCraftTransport.pipePowerStone, 'g', Blocks.glass); - } } private int findUnusedBiomeID(String biomeName) { diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index da7e5b7b..df2673d1 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -48,11 +48,7 @@ public final class BlockUtil { public static List getItemStackFromBlock(WorldServer world, int i, int j, int k) { Block block = world.getBlock(i, j, k); - if (block == null) { - return null; - } - - if (block.isAir(world, i, j, k)) { + if (block == null || block.isAir(world, i, j, k)) { return null; } diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 89246db8..ed8abb10 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -267,11 +267,11 @@ public final class OilPopulate { } private boolean isReplaceableForLake(World world, BiomeGenBase biome, int x, int y, int z) { - Block block = world.getBlock(x, y, z); - - if (block == null) { + if (world.isAirBlock(x, y, z)) { return true; } + + Block block = world.getBlock(x, y, z); if (block == biome.fillerBlock || block == biome.topBlock) { return true; @@ -311,7 +311,7 @@ public final class OilPopulate { } private void setOilWithProba(World world, BiomeGenBase biome, Random rand, float proba, int x, int y, int z, int depth) { - if (rand.nextFloat() <= proba && world.getBlock(x, y - depth - 1, z) != null) { + if (rand.nextFloat() <= proba && !world.isAirBlock(x, y - depth - 1, z)) { if (isOilAdjacent(world, x, y, z)) { setOilColumnForLake(world, biome, x, y, z, depth, 3); } @@ -351,7 +351,7 @@ public final class OilPopulate { for (; y > 0; --y) { Block block = chunk.getBlock(trimmedX, y, trimmedZ); - if (block == null) { + if (block.isAir(world, x, y, z)) { continue; }