Fix excessive network traffic from Extractor

This commit is contained in:
Shadowfacts 2021-03-13 11:28:50 -05:00
parent f56ab5dc7e
commit 396e811109
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ class ExtractorBlockEntity: DeviceBlockEntity(PhyBlockEntities.EXTRACTOR),
for (slot in 0 until inventory.slotCount) { for (slot in 0 until inventory.slotCount) {
val slotStack = inventory.getInvStack(slot) val slotStack = inventory.getInvStack(slot)
if (slotStack.isEmpty) continue if (slotStack.isEmpty) continue
dispatchItemStack(slotStack) { insertion -> val extractable = inventory.extractStack(slot, ExactItemStackFilter(slotStack), ItemStack.EMPTY, slotStack.count, Simulation.SIMULATE)
if (extractable.isEmpty) continue
dispatchItemStack(extractable) { insertion ->
insertion.inventory = inventory insertion.inventory = inventory
insertion.inventorySlot = slot insertion.inventorySlot = slot
} }