Fix Miner not inserting things

This commit is contained in:
Shadowfacts 2021-03-09 18:25:59 -05:00
parent 815a9ab8af
commit b78eb192de
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 7 additions and 7 deletions

View File

@ -17,10 +17,7 @@ import net.shadowfacts.phycon.api.packet.Packet
import net.shadowfacts.phycon.init.PhyBlockEntities
import net.shadowfacts.phycon.block.DeviceBlockEntity
import net.shadowfacts.phycon.block.terminal.TerminalBlockEntity
import net.shadowfacts.phycon.component.ActivationController
import net.shadowfacts.phycon.component.NetworkStackDispatcher
import net.shadowfacts.phycon.component.NetworkStackProvider
import net.shadowfacts.phycon.component.handleItemStack
import net.shadowfacts.phycon.component.*
import net.shadowfacts.phycon.packet.*
import net.shadowfacts.phycon.util.ActivationMode
import net.shadowfacts.phycon.util.ClientConfigurableDevice
@ -55,6 +52,7 @@ class MinerBlockEntity: DeviceBlockEntity(PhyBlockEntities.MINER),
is ExtractStackPacket -> handleExtractStack(packet)
is CapacityPacket -> handleCapacity(packet)
is ItemStackPacket -> handleItemStack(packet)
is RemoteActivationPacket -> controller.handleRemoteActivation(packet)
}
}
@ -122,9 +120,11 @@ class MinerBlockEntity: DeviceBlockEntity(PhyBlockEntities.MINER),
override fun tick() {
super.tick()
if (!world!!.isClient && minerMode == MinerMode.AUTOMATIC) {
controller.tick()
if (!world!!.isClient) {
if (minerMode == MinerMode.AUTOMATIC) {
controller.tick()
}
finishTimedOutPendingInsertions()
}
}