aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/implementations
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/implementations
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/implementations')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java16
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java17
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java19
3 files changed, 23 insertions, 29 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
index a393206257..56849e1e73 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
@@ -295,7 +295,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
mTransferredVoltageLast20 = 0;
mTransferredAmperageLast20OK=mTransferredAmperageLast20;
mTransferredAmperageLast20 = 0;
- if (!GT_Mod.gregtechproxy.gt6Cable) checkConnections();
+ if (!GT_Mod.gregtechproxy.gt6Cable || mCheckConnections) checkConnections();
}
} else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate();
}
@@ -347,13 +347,6 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
final byte tSide = GT_Utility.getOppositeSide(aSide);
final ForgeDirection tDir = ForgeDirection.getOrientation(tSide);
- if (tTileEntity instanceof IColoredTileEntity) {
- if (getBaseMetaTileEntity().getColorization() >= 0) {
- byte tColor = ((IColoredTileEntity) tTileEntity).getColorization();
- if (tColor >= 0 && tColor != getBaseMetaTileEntity().getColorization()) return false;
- }
- }
-
// GT Machine handling
if ((tTileEntity instanceof IEnergyConnected) &&
(((IEnergyConnected) tTileEntity).inputEnergyFrom(tSide, false) || ((IEnergyConnected) tTileEntity).outputsEnergyTo(tSide, false)))
@@ -387,6 +380,13 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
}
@Override
+ public boolean getGT6StyleConnection() {
+ // Yes if GT6 Cables are enabled
+ return GT_Mod.gregtechproxy.gt6Cable;
+ }
+
+
+ @Override
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return false;
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
index 0644a07de1..e7a3dedb61 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
@@ -227,7 +227,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
mLastReceivedFrom = 0;
}
- if (!GT_Mod.gregtechproxy.gt6Pipe) checkConnections();
+ if (!GT_Mod.gregtechproxy.gt6Pipe || mCheckConnections) checkConnections();
boolean shouldDistribute = (oLastReceivedFrom == mLastReceivedFrom);
for (int i = 0, j = aBaseMetaTileEntity.getRandomNumber(mPipeAmount); i < mPipeAmount; i++) {
@@ -387,15 +387,6 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
if (coverBehavior instanceof GT_Cover_Drain) return true;
- if (gTileEntity != null && getBaseMetaTileEntity().getColorization() >= 0) {
- // If we're painted...
- byte tColor = gTileEntity.getColorization();
- if (tColor >= 0 && (tColor & 15) != (getBaseMetaTileEntity().getColorization() & 15)) {
- // and the other tile entity is painted.. then we must both be painted the same color
- return false;
- }
- }
-
// Tinker Construct Faucets return a null tank info, so check the class
if (GregTech_API.mTConstruct && tTileEntity instanceof tconstruct.smeltery.logic.FaucetLogic) return true;
@@ -416,6 +407,12 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
}
@Override
+ public boolean getGT6StyleConnection() {
+ // Yes if GT6 pipes are enabled
+ return GT_Mod.gregtechproxy.gt6Pipe;
+ }
+
+ @Override
public void doSound(byte aIndex, double aX, double aY, double aZ) {
super.doSound(aIndex, aX, aY, aZ);
if (aIndex == 9) {
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
index a57e78885b..bba105c95f 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
@@ -158,7 +158,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
if (aBaseMetaTileEntity.isServerSide() && aTick % 10 == 0) {
if (aTick % mTickTime == 0) mTransferredItems = 0;
- if (!GT_Mod.gregtechproxy.gt6Pipe) checkConnections();
+ if (!GT_Mod.gregtechproxy.gt6Pipe || mCheckConnections) checkConnections();
if (oLastReceivedFrom == mLastReceivedFrom) {
doTickProfilingInThisTick = false;
@@ -220,16 +220,8 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
final IGregTechTileEntity gTileEntity = (tTileEntity instanceof IGregTechTileEntity) ? (IGregTechTileEntity) tTileEntity : null;
if (gTileEntity != null) {
if (gTileEntity.getMetaTileEntity() == null) return false;
- connectable = true;
- if ( getBaseMetaTileEntity().getColorization() >= 0) {
- // If we're painted...
- byte tColor = gTileEntity.getColorization();
- if (tColor >= 0 && (tColor & 15) != (getBaseMetaTileEntity().getColorization() & 15)) {
- // and the other tile entity is painted.. then we must both be painted the same color
- return false;
- }
- }
if (gTileEntity.getMetaTileEntity().connectsToItemPipe(tSide)) return true;
+ connectable = true;
}
if (tTileEntity instanceof IInventory) {
@@ -239,13 +231,18 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
if (tTileEntity instanceof ISidedInventory) {
int[] tSlots = ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(tSide);
if (tSlots == null || tSlots.length <= 0) return false;
-
connectable = true;
}
return connectable;
}
+ @Override
+ public boolean getGT6StyleConnection() {
+ // Yes if GT6 pipes are enabled
+ return GT_Mod.gregtechproxy.gt6Pipe;
+ }
+
@Override
public boolean incrementTransferCounter(int aIncrement) {