aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
diff options
context:
space:
mode:
authorDream-Master <dream-master@gmx.net>2018-09-05 21:16:26 +0200
committerDream-Master <dream-master@gmx.net>2018-09-05 21:16:26 +0200
commitb568d9c0f42a60bb563a7cee437405e9fac4c975 (patch)
treeb78b3a1adaa25cba0df0e3cbd03eef663b80f778 /src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
parent95fa25b6b8538e5f4d5729d9cb5da1e2e89d908e (diff)
parent9cd17d07c543a14a80672fa709c419f7c580a344 (diff)
downloadGT5-Unofficial-b568d9c0f42a60bb563a7cee437405e9fac4c975.tar.gz
GT5-Unofficial-b568d9c0f42a60bb563a7cee437405e9fac4c975.tar.bz2
GT5-Unofficial-b568d9c0f42a60bb563a7cee437405e9fac4c975.zip
Merge remote-tracking branch 'origin/pipe_overhaul_and_fluidfilter_fix' into New_test_dev
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
index c58db1c81a..2a86b2bbf0 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
@@ -50,6 +50,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
private byte[] mSidedRedstone = new byte[]{0, 0, 0, 0, 0, 0};
private int[] mCoverSides = new int[]{0, 0, 0, 0, 0, 0}, mCoverData = new int[]{0, 0, 0, 0, 0, 0}, mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING];
private boolean mInventoryChanged = false, mWorkUpdate = false, mWorks = true, mNeedsUpdate = true, mNeedsBlockUpdate = true, mSendClientData = false;
+ private boolean mCheckConnections = false;
private byte mColor = 0, oColor = 0, mStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, mLagWarningCount = 0;
private int oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0;
private short mID = 0;
@@ -1294,8 +1295,9 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
@Override
public byte setColorization(byte aColor) {
if (aColor > 15 || aColor < -1) aColor = -1;
+ mColor = (byte) (aColor + 1);
if (canAccessData()) mMetaTileEntity.onColorChangeServer(aColor);
- return mColor = (byte) (aColor + 1);
+ return mColor;
}
@Override
@@ -1353,6 +1355,18 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
mInventoryChanged = true;
}
+ public void onNeighborBlockChange(int aX, int aY, int aZ) {
+ if (canAccessData()) {
+ final IMetaTileEntity meta = getMetaTileEntity();
+ if (meta instanceof MetaPipeEntity) {
+ // Trigger a checking of connections in case someone placed down a block that the pipe/wire shouldn't be connected to.
+ // However; don't do it immediately in case the world isn't finished loading
+ // (This caused issues with AE2 GTEU p2p connections.
+ ((MetaPipeEntity) meta).setCheckConnections();
+ }
+ }
+ }
+
@Override
public int getLightOpacity() {
return mMetaTileEntity == null ? 0 : mMetaTileEntity.getLightOpacity();