aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2018-09-03 18:21:40 -0700
committerJason Mitchell <mitchej@gmail.com>2018-09-03 18:21:40 -0700
commitfad72d1c68001be4cac656309a18436dadb862bb (patch)
treecd6f72152a7af9caa2faec6b6d9497a1b12a5450 /src/main/java/gregtech/common
parent1698e57f729efb52e2b98e865a9671f0b50a5b2e (diff)
downloadGT5-Unofficial-fad72d1c68001be4cac656309a18436dadb862bb.tar.gz
GT5-Unofficial-fad72d1c68001be4cac656309a18436dadb862bb.tar.bz2
GT5-Unofficial-fad72d1c68001be4cac656309a18436dadb862bb.zip
* 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
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java7
1 files changed, 7 insertions, 0 deletions
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))) {