mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
reducing some cost to calling ae getCraftables when no filter is given
this delays calling ae.getItemStack until user code calls it for individual items. this is vey helpful for servers with huge numbers of craftables otherwise, all serializing calls happen on the main thread closes #2964
This commit is contained in:
parent
dd63789b81
commit
bfed64fa2d
@ -101,7 +101,7 @@ trait NetworkControl[AETile >: Null <: TileEntity with IGridProxyable with IActi
|
||||
case (key: String, value: AnyRef) => (key, value)
|
||||
}
|
||||
result(allCraftables
|
||||
.collect{ case aeCraftItem if matches(convert(aeCraftItem), filter) => new NetworkControl.Craftable(tile, aeCraftItem) }
|
||||
.collect{ case aeCraftItem if filter.isEmpty || matches(convert(aeCraftItem), filter) => new NetworkControl.Craftable(tile, aeCraftItem) }
|
||||
.toArray)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user