diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index 35106e60..9c37a814 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -141,7 +141,7 @@ public class BlockMarker extends BlockContainer { int meta = world.getBlockMetadata(x, y, z); if (!canPlaceBlockOnSide(world, x, y, z, meta)) { dropBlockAsItem(world, x, y, z, 0, 0); - world.setBlock(x, y, z, null); + world.setBlockToAir(x, y, z); } } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 038f2ce2..0ce0f28c 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -189,7 +189,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP path = ((TilePathMarker) tile).getPath(); for (BlockIndex b : path) { - worldObj.setBlock(b.x, b.y, b.z, null); + worldObj.setBlockToAir(b.x, b.y, b.z); BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, 0, 0); } diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index 71df892a..d6502907 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -404,13 +404,13 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { for (TileWrapper m : o.vect.clone()) { if (m.isSet()) { - worldObj.setBlock(m.x, m.y, m.z, null); + worldObj.setBlockToAir(m.x, m.y, m.z); BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, m.x, m.y, m.z, 0, 0); } } - worldObj.setBlock(o.vectO.x, o.vectO.y, o.vectO.z, null); + worldObj.setBlockToAir(o.vectO.x, o.vectO.y, o.vectO.z); BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, o.vectO.x, o.vectO.y, o.vectO.z, 0, 0); } diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index a602dc8c..507d8475 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -82,7 +82,7 @@ public class BlockUtil { } } - world.setBlock(x, y, z, null); + world.setBlockToAir(x, y, z); } public static boolean isAnObstructingBlock(Block block, World world, int x, int y, int z) { diff --git a/common/buildcraft/energy/BucketHandler.java b/common/buildcraft/energy/BucketHandler.java index 9938428b..11490f18 100644 --- a/common/buildcraft/energy/BucketHandler.java +++ b/common/buildcraft/energy/BucketHandler.java @@ -14,6 +14,7 @@ import java.util.Map; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; @@ -31,26 +32,26 @@ public class BucketHandler { @SubscribeEvent public void onBucketFill(FillBucketEvent event) { - ItemStack result = fillCustomBucket(event.world, event.target); - if (result == null) + if (result == null) { return; + } event.result = result; event.setResult(Result.ALLOW); } private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { - Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); Item bucket = Item.getItemFromBlock(block); + if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { - world.setBlock(pos.blockX, pos.blockY, pos.blockZ, null); + world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); return new ItemStack(bucket); - } else + } else { return null; - + } } } diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 52c12eee..06c74fee 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -330,7 +330,7 @@ public class OilPopulate { return; } if (!world.isAirBlock(x, y + 1, z)) { - world.setBlock(x, y + 1, z, null, 0, update); + world.setBlock(x, y + 1, z, Blocks.air, 0, update); } for (int d = 1; d <= depth - 1; d++) { diff --git a/common/buildcraft/factory/BlockFrame.java b/common/buildcraft/factory/BlockFrame.java index 9ee0fd20..110d5d04 100644 --- a/common/buildcraft/factory/BlockFrame.java +++ b/common/buildcraft/factory/BlockFrame.java @@ -47,7 +47,7 @@ public class BlockFrame extends Block implements IFramePipeConnection { int meta = world.getBlockMetadata(i, j, k); if (meta == 1 && random.nextInt(10) > 5) { - world.setBlock(i, j, k, null); + world.setBlockToAir(i, j, k); } }