mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 15:39:22 +01:00
oops
This commit is contained in:
parent
9aeb5d807c
commit
4a04535050
1 changed files with 3 additions and 3 deletions
|
@ -410,11 +410,11 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
|
|||
}
|
||||
|
||||
public void createNetworkLock(NetworkLock lock) {
|
||||
this.networkLocks.put(lock.location != null ? lock.location.getPos() : null, lock);
|
||||
this.networkLocks.put(lock.location.getPos(), lock);
|
||||
}
|
||||
|
||||
public void resolveNetworkLock(NetworkLock lock) {
|
||||
this.networkLocks.remove(lock.location != null ? lock.location.getPos() : null, lock);
|
||||
this.networkLocks.remove(lock.location.getPos(), lock);
|
||||
}
|
||||
|
||||
public List<NetworkLock> getNetworkLocks(BlockPos pos) {
|
||||
|
@ -422,7 +422,7 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
|
|||
}
|
||||
|
||||
public int getLockedAmount(BlockPos pos, ItemStack stack, NetworkLock ignoredLock, ItemEquality... equalityTypes) {
|
||||
return Streams.concat(this.getNetworkLocks(pos).stream(), this.getNetworkLocks(null).stream())
|
||||
return this.getNetworkLocks(pos).stream()
|
||||
.filter(l -> !l.equals(ignoredLock) && ItemEquality.compareItems(l.stack, stack, equalityTypes))
|
||||
.mapToInt(l -> l.stack.getCount()).sum();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue