un-un-un-restore 6.1.3 valve behaviour, use a hack to reset pipe state on valve action change
This commit is contained in:
parent
ad25b17c6e
commit
388871fed4
1 changed files with 9 additions and 6 deletions
|
@ -47,6 +47,7 @@ import buildcraft.transport.gates.ItemGate;
|
|||
import buildcraft.transport.gates.StatementSlot;
|
||||
import buildcraft.transport.gui.ContainerGateInterface;
|
||||
import buildcraft.transport.statements.ActionRedstoneFaderOutput;
|
||||
import buildcraft.transport.statements.ActionValve;
|
||||
|
||||
public final class Gate implements IGate, IStatementContainer {
|
||||
|
||||
|
@ -102,6 +103,14 @@ public final class Gate implements IGate, IStatementContainer {
|
|||
}
|
||||
|
||||
public void setAction(int position, IStatement action) {
|
||||
// HUGE HACK! TODO - Remove in 6.2 API rewrite by adding
|
||||
// ways for actions to fix their state on removal.
|
||||
if (actions[position] instanceof ActionValve && pipe != null && pipe.transport != null) {
|
||||
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
|
||||
pipe.transport.allowInput(side, true);
|
||||
pipe.transport.allowOutput(side, true);
|
||||
}
|
||||
}
|
||||
actions[position] = action;
|
||||
}
|
||||
|
||||
|
@ -351,12 +360,6 @@ public final class Gate implements IGate, IStatementContainer {
|
|||
int oldRedstoneOutputSide = redstoneOutputSide;
|
||||
redstoneOutputSide = 0;
|
||||
|
||||
// Open all sides - for valves
|
||||
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
|
||||
pipe.transport.allowInput(side, true);
|
||||
pipe.transport.allowOutput(side, true);
|
||||
}
|
||||
|
||||
boolean wasActive = activeActions.size() > 0;
|
||||
|
||||
BitSet temp = prevBroadcastSignal;
|
||||
|
|
Loading…
Reference in a new issue