From fad72d1c68001be4cac656309a18436dadb862bb Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 3 Sep 2018 18:21:40 -0700 Subject: * Fix: Colored cables/pipes properly connect (or don't) to each other based on color * Trigger connection evaluation on painting of cables/pipes or machines * Trigger connection evaluation on placement of blocks -- IE: A wire/pipe open to air, and then a dirt block is placed on it - this will close the pipe/wire connection --- src/main/java/gregtech/common/blocks/GT_Block_Machines.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index 8688fce78f..157a38962a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -87,6 +87,13 @@ public class GT_Block_Machines } } + public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if ((tTileEntity instanceof BaseMetaPipeEntity)) { + ((BaseMetaPipeEntity) tTileEntity).onNeighborBlockChange(aX, aY, aZ); + } + } + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { super.onBlockAdded(aWorld, aX, aY, aZ); if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { -- cgit