mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 03:49:31 +00:00
This commit is contained in:
1 parent
eb43d878df
commit
5e3c3d58a6
2 files changed
+23
-20
No files matched your search
@@ -48,11 +48,11 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
|
||||
//it causes issues with not conecting to empty tanks such as dim. trans +
|
||||
//BC fluid pipes, so I am removing it for now.
|
||||
|
||||
// FluidTankInfo[] info = h.getTankInfo(direction.getOpposite());
|
||||
// if(info == null) {
|
||||
// return false;
|
||||
// }
|
||||
// return info.length > 0;
|
||||
// FluidTankInfo[] info = h.getTankInfo(direction.getOpposite());
|
||||
// if(info == null) {
|
||||
// return false;
|
||||
// }
|
||||
// return info.length > 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -134,11 +134,16 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
|
||||
|
||||
DyeColor col = getExtractionSignalColor(dir);
|
||||
int signal = ConduitUtil.getInternalSignalForColor(getBundle(), col);
|
||||
if(mode.isConditionMet(mode, signal) && mode != RedstoneControlMode.OFF) {
|
||||
return true;
|
||||
|
||||
boolean res;
|
||||
if(mode == RedstoneControlMode.OFF) {
|
||||
//if checking for no signal, must be no signal from both
|
||||
res = mode.isConditionMet(mode, signal) && (col != DyeColor.RED || isConditionMetByExternalSignal(dir, mode, col));
|
||||
} else {
|
||||
//if checking for a signal, either is fine
|
||||
res = mode.isConditionMet(mode, signal) || (col == DyeColor.RED && isConditionMetByExternalSignal(dir, mode, col));
|
||||
}
|
||||
|
||||
return isConditionMetByExternalSignal(dir, mode, col);
|
||||
return res;
|
||||
}
|
||||
|
||||
private boolean isConditionMetByExternalSignal(ForgeDirection dir, RedstoneControlMode mode, DyeColor col) {
|
||||
|
||||
@@ -285,19 +285,17 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
|
||||
}
|
||||
|
||||
DyeColor col = getExtractionSignalColor(dir);
|
||||
// internal signal
|
||||
int signal = ConduitUtil.getInternalSignalForColor(getBundle(), col);
|
||||
if(mode.isConditionMet(mode, signal)) {
|
||||
return true;
|
||||
int exSig = getExternalRedstoneSignalForDir(dir);
|
||||
boolean res;
|
||||
if(mode == RedstoneControlMode.OFF) {
|
||||
//if checking for no signal, must be no signal from both
|
||||
res = mode.isConditionMet(mode, signal) && (col != DyeColor.RED || mode.isConditionMet(mode, exSig));
|
||||
} else {
|
||||
//if checking for a signal, either is fine
|
||||
res = mode.isConditionMet(mode, signal) || (col == DyeColor.RED && mode.isConditionMet(mode, exSig));
|
||||
}
|
||||
|
||||
// external signal
|
||||
if(col != DyeColor.RED) {
|
||||
//can't get a non-red signal externally at this stage so no go
|
||||
return false;
|
||||
}
|
||||
int val = getExternalRedstoneSignalForDir(dir);
|
||||
return mode.isConditionMet(mode, val);
|
||||
return res;
|
||||
}
|
||||
|
||||
private int getExternalRedstoneSignalForDir(ForgeDirection dir) {
|
||||
|
||||
Reference in new issue
Block a user