fix gates having a shared set of expansion trigger/actions

This commit is contained in:
asiekierka 2015-04-28 18:41:55 +02:00
parent 7c2a25b9be
commit 0e16c262d2
2 changed files with 7 additions and 11 deletions

View file

@ -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;
}

View file

@ -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);