From de8da4c008efb6a38283a0649b6a0d18d6c629d9 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Sat, 5 Oct 2013 06:18:01 -0700 Subject: [PATCH] Some minor cleanup --- common/buildcraft/core/EntityRobot.java | 4 ++-- common/buildcraft/core/utils/BlockUtil.java | 12 ++++++------ common/buildcraft/factory/TileQuarry.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/buildcraft/core/EntityRobot.java b/common/buildcraft/core/EntityRobot.java index 054f7e21..6a460050 100644 --- a/common/buildcraft/core/EntityRobot.java +++ b/common/buildcraft/core/EntityRobot.java @@ -213,12 +213,12 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { if (target.mode == Mode.ClearIfInvalid) { if (!target.isValid(a.context)) { - worldObj.setBlock(target.x, target.y, target.z, 0, 0,3); + worldObj.setBlockToAir(target.x, target.y, target.z); } } else if (target.stackToUse != null) { - worldObj.setBlock(target.x, target.y, target.z, 0); + worldObj.setBlockToAir(target.x, target.y, target.z); throw new RuntimeException("NOT IMPLEMENTED"); // target.stackToUse.getItem().onItemUse(target.stackToUse, // CoreProxy.getBuildCraftPlayer(worldObj), worldObj, target.x, target.y - 1, diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index fa95412f..3b173e7b 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -74,14 +74,14 @@ public class BlockUtil { return canChangeBlock(world.getBlockId(x, y, z), world, x, y, z); } - public static boolean isAnObstructingBlock(int blockID, World world, int x, int y, int z) - { - Block block = Block.blocksList[blockID]; + public static boolean isAnObstructingBlock(int blockID, World world, int x, int y, int z) { + Block block = Block.blocksList[blockID]; - if (blockID == 0 || block == null || block.isAirBlock(world, x, y, z)) - return false; - return true; + if (blockID == 0 || block == null || block.isAirBlock(world, x, y, z)) + return false; + return true; } + public static boolean canChangeBlock(int blockID, World world, int x, int y, int z) { Block block = Block.blocksList[blockID]; diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index d33ca246..837f18b6 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -434,7 +434,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } worldObj.playAuxSFXAtEntity(null, 2001, i, j, k, blockId + (worldObj.getBlockMetadata(i, j, k) << 12)); - worldObj.setBlock(i, j, k, 0); + worldObj.setBlockToAir(i, j, k); } // Collect any lost items laying around