Merge pull request #59 from GTNewHorizons/feature/filter-fix

Fixes filtering for optional keys
This commit is contained in:
Martin Robertz 2022-04-15 19:25:49 +02:00 committed by GitHub
commit ab430d1d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,6 +150,7 @@ trait NetworkControl[AETile >: Null <: TileEntity with IGridProxyable with IActi
filter.forall {
case (key: String, value: AnyRef) =>
val stack_value = stack.get(key)
if (stack_value == null) return false
value match {
case number: Number => stack_value match {
case stack_number: Number => number.intValue == stack_number.intValue