redstone output is now sided for gates, close #2085
This commit is contained in:
parent
482e1d575c
commit
030191d7cd
1 changed files with 4 additions and 12 deletions
|
@ -407,18 +407,10 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
|
|||
return false;
|
||||
}
|
||||
|
||||
private int getMaxRedstoneOutput() {
|
||||
int max = 0;
|
||||
private int getRedstoneOutput(ForgeDirection dir) {
|
||||
Gate gate = gates[dir.ordinal()];
|
||||
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
Gate gate = gates[dir.ordinal()];
|
||||
|
||||
if (gate != null && gate.getRedstoneOutput() > max) {
|
||||
max = gate.getRedstoneOutput();
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
return gate != null ? gate.getRedstoneOutput() : 0;
|
||||
}
|
||||
|
||||
public int isPoweringTo(int side) {
|
||||
|
@ -429,7 +421,7 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
|
|||
if (tile instanceof TileGenericPipe && container.isPipeConnected(o)) {
|
||||
return 0;
|
||||
} else {
|
||||
return getMaxRedstoneOutput();
|
||||
return getRedstoneOutput(o);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue