diff options
author | Antifluxfield <lyj_299792458@163.com> | 2017-12-21 14:58:34 -0600 |
---|---|---|
committer | Blood-Asp <bloodasphendrik@gmail.com> | 2017-12-21 21:58:34 +0100 |
commit | f73c0fd7ef4c758ac677b521399fbcef8909d40f (patch) | |
tree | c249a6b9087d9e73bfba38a01ab7556c57d1a9ab /src/main/java/gregtech/api/interfaces | |
parent | a40750b3b8c6fca9c8e66bfbf4c92357cb57deda (diff) | |
download | GT5-Unofficial-f73c0fd7ef4c758ac677b521399fbcef8909d40f.tar.gz GT5-Unofficial-f73c0fd7ef4c758ac677b521399fbcef8909d40f.tar.bz2 GT5-Unofficial-f73c0fd7ef4c758ac677b521399fbcef8909d40f.zip |
Fix pipe behaviors (#1329)
* Try to fix #1301
* Fix pipe behavior with covers at side
* Fix item pipe & cable behavior
* Update
* Update 2
* Based on @mitchej123 's work
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
3 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index c1391371b9..96c03bbd6d 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -13,4 +13,6 @@ public interface IConnectable { * Try to disconnect to the Block at the specified side
*/
public void disconnect(byte aSide);
+
+ public boolean isConnectedAtSide(int aSide);
}
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java index 54f1f484b7..04d9f0fb84 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -55,6 +55,7 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); aMap.put(aMetaTileEntity, aStep); for (byte i = 0, j = 0; i < 6; i++) { + if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) continue; j = GT_Utility.getOppositeSide(i); if (aSuckItems) { if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index 63020684c0..98360411bd 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -42,6 +42,11 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd public boolean outputsEnergyTo(byte aSide); /** + * Are we ready for energy state? + */ + public boolean energyStateReady(); + + /** * Utility for the Network */ public static class Util { |