Merge branch 'master-MC1.8.9' of github.com:MightyPirates/OpenComputers into master-MC1.9.4

This commit is contained in:
Florian Nücke 2016-05-25 18:34:15 +02:00
commit cf7ce65a96

View File

@ -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?
}
}
/**