mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-22 11:52:38 -04:00
Merge branch 'master-MC1.8.9' of github.com:MightyPirates/OpenComputers into master-MC1.9.4
This commit is contained in:
commit
cf7ce65a96
@ -13,6 +13,7 @@ import li.cil.oc.common.block.RobotAfterimage
|
||||
import li.cil.oc.util.BlockPosition
|
||||
import li.cil.oc.util.ExtendedWorld._
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.entity.player.EntityPlayerMP
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.nbt.CompressedStreamTools
|
||||
import net.minecraft.network.INetHandler
|
||||
@ -50,6 +51,13 @@ abstract class PacketHandler {
|
||||
case e: Throwable =>
|
||||
OpenComputers.log.warn("Received a badly formatted packet.", e)
|
||||
}
|
||||
|
||||
// Avoid AFK kicks by marking players as non-idle when they send packets.
|
||||
// This will usually be stuff like typing while in screen GUIs.
|
||||
player match {
|
||||
case mp: EntityPlayerMP => mp.markPlayerActive()
|
||||
case _ => // Uh... OK?
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user