diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 63953429..375f9159 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -1312,8 +1312,7 @@ public class BlockGenericPipe extends BlockBuildCraft { public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour) { TileGenericPipe pipeTile = (TileGenericPipe) world.getTileEntity(x, y, z); if (!pipeTile.hasPlug(side)) { - pipeTile.setColor(colour); - return true; + return pipeTile.setColor(colour); } return false; diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 55793e9e..513db544 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -434,13 +434,15 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler, return worldObj.isRemote ? renderState.glassColor : this.glassColor; } - public void setColor(int color) { + public boolean setColor(int color) { // -1 = no color - if (!worldObj.isRemote && color >= -1 && color < 16) { + if (!worldObj.isRemote && color >= -1 && color < 16 && glassColor != color) { glassColor = color; notifyBlockChanged(); worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + return true; } + return false; } /**