fix gates having a shared set of expansion trigger/actions
This commit is contained in:
parent
7c2a25b9be
commit
0e16c262d2
2 changed files with 7 additions and 11 deletions
|
@ -21,6 +21,10 @@ public class PipeActionProvider implements IActionProvider {
|
|||
Pipe<?> pipe = null;
|
||||
if (container instanceof IGate) {
|
||||
pipe = (Pipe<?>) ((IGate) container).getPipe();
|
||||
|
||||
if (container instanceof Gate) {
|
||||
((Gate) container).addActions(result);
|
||||
}
|
||||
}
|
||||
|
||||
if (pipe == null) {
|
||||
|
@ -28,12 +32,6 @@ public class PipeActionProvider implements IActionProvider {
|
|||
}
|
||||
|
||||
result.addAll(pipe.getActions());
|
||||
|
||||
for (Gate gate : pipe.gates) {
|
||||
if (gate != null) {
|
||||
gate.addActions(result);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -37,11 +37,9 @@ public class PipeTriggerProvider implements ITriggerProvider {
|
|||
|
||||
boolean containsGate = false;
|
||||
|
||||
for (Gate gate : pipe.gates) {
|
||||
if (gate != null) {
|
||||
containsGate = true;
|
||||
gate.addTriggers(result);
|
||||
}
|
||||
if (container instanceof Gate) {
|
||||
containsGate = true;
|
||||
((Gate) container).addTriggers(result);
|
||||
}
|
||||
|
||||
result.add(BuildCraftCore.triggerRedstoneActive);
|
||||
|
|
Loading…
Reference in a new issue