wooden power pipes should not give their information to a gate
This commit is contained in:
parent
a6c351a8e4
commit
0385bc4e42
2 changed files with 5 additions and 3 deletions
|
@ -68,6 +68,7 @@ public class TriggerEnergy extends BCStatement implements ITriggerInternal, ITri
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTriggerActive(IStatementContainer container, IStatementParameter[] parameters) {
|
public boolean isTriggerActive(IStatementContainer container, IStatementParameter[] parameters) {
|
||||||
if (container instanceof IGate) {
|
if (container instanceof IGate) {
|
||||||
|
@ -80,7 +81,6 @@ public class TriggerEnergy extends BCStatement implements ITriggerInternal, ITri
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTriggerActive(TileEntity tile, ForgeDirection side, IStatementContainer container, IStatementParameter[] parameters) {
|
public boolean isTriggerActive(TileEntity tile, ForgeDirection side, IStatementContainer container, IStatementParameter[] parameters) {
|
||||||
if (tile instanceof IEnergyHandler || tile instanceof IEnergyProvider || tile instanceof IEnergyReceiver) {
|
if (tile instanceof IEnergyHandler || tile instanceof IEnergyProvider || tile instanceof IEnergyReceiver) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ import buildcraft.api.statements.IStatementContainer;
|
||||||
import buildcraft.api.statements.ITriggerExternal;
|
import buildcraft.api.statements.ITriggerExternal;
|
||||||
import buildcraft.api.statements.ITriggerInternal;
|
import buildcraft.api.statements.ITriggerInternal;
|
||||||
import buildcraft.api.statements.ITriggerProvider;
|
import buildcraft.api.statements.ITriggerProvider;
|
||||||
|
import buildcraft.transport.pipes.PipePowerWood;
|
||||||
import buildcraft.transport.statements.TriggerPipeContents;
|
import buildcraft.transport.statements.TriggerPipeContents;
|
||||||
|
|
||||||
public class PipeTriggerProvider implements ITriggerProvider {
|
public class PipeTriggerProvider implements ITriggerProvider {
|
||||||
|
@ -69,7 +70,8 @@ public class PipeTriggerProvider implements ITriggerProvider {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tile instanceof IEnergyHandler && ((IEnergyHandler) tile).getMaxEnergyStored(ForgeDirection.UNKNOWN) > 0) {
|
if (tile instanceof IEnergyHandler && ((IEnergyHandler) tile).getMaxEnergyStored(ForgeDirection.UNKNOWN) > 0
|
||||||
|
&& !(pipe instanceof PipePowerWood)) {
|
||||||
result.add((ITriggerInternal) BuildCraftCore.triggerEnergyHigh);
|
result.add((ITriggerInternal) BuildCraftCore.triggerEnergyHigh);
|
||||||
result.add((ITriggerInternal) BuildCraftCore.triggerEnergyLow);
|
result.add((ITriggerInternal) BuildCraftCore.triggerEnergyLow);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue