mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 11:53:29 +01:00
fixed a rare exception when modules calculate incorrect next nodes
closes #187
This commit is contained in:
parent
f61178a098
commit
f34c89f914
1 changed files with 1 additions and 1 deletions
|
@ -379,7 +379,7 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
|
||||||
public int getNextNode(List<BlockPos> nodes, int index) {
|
public int getNextNode(List<BlockPos> nodes, int index) {
|
||||||
return this.streamModules()
|
return this.streamModules()
|
||||||
.map(m -> m.getRight().getCustomNextNode(m.getLeft(), this, nodes, index))
|
.map(m -> m.getRight().getCustomNextNode(m.getLeft(), this, nodes, index))
|
||||||
.filter(Objects::nonNull).findFirst().orElse(index);
|
.filter(m -> m != null && m >= 0).findFirst().orElse(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ItemFilter> getFilters() {
|
public List<ItemFilter> getFilters() {
|
||||||
|
|
Loading…
Reference in a new issue