aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
index 0d06c4ec03..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;
@@ -645,11 +646,21 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
}
@Override
+ public boolean inputEnergyFrom(byte aSide, boolean waitForActive) {
+ return false;
+ }
+
+ @Override
public boolean outputsEnergyTo(byte aSide) {
return false;
}
@Override
+ public boolean outputsEnergyTo(byte aSide, boolean waitForActive) {
+ return false;
+ }
+
+ @Override
public long getOutputAmperage() {
return 0;
}
@@ -1284,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
@@ -1343,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();
@@ -1362,9 +1386,4 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
mMetaTileEntity.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider);
}
-
- @Override
- public boolean energyStateReady() {
- return true;
- }
}