From 043548e78e31dc97d1eb2f2d623daad6396ca52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Thu, 23 Apr 2015 21:37:49 +0200 Subject: [PATCH] Removed broken workaround for not progressing robot hover animation when game is paused. Closes #1101. Because the bug in Mystcraft the workaround was required for in the first place has been fixed. \o/ --- .../cil/oc/client/renderer/tileentity/RobotRenderer.scala | 2 +- src/main/scala/li/cil/oc/common/EventHandler.scala | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala b/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala index c1346658c..804425e49 100644 --- a/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala +++ b/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala @@ -282,7 +282,7 @@ object RobotRenderer extends TileEntitySpecialRenderer { val proxy = entity.asInstanceOf[tileentity.RobotProxy] val robot = proxy.robot - val worldTime = EventHandler.totalWorldTicks + f + val worldTime = entity.getWorldObj.getTotalWorldTime + f GL11.glPushMatrix() GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5) diff --git a/src/main/scala/li/cil/oc/common/EventHandler.scala b/src/main/scala/li/cil/oc/common/EventHandler.scala index ac0839251..0ae41bbb4 100644 --- a/src/main/scala/li/cil/oc/common/EventHandler.scala +++ b/src/main/scala/li/cil/oc/common/EventHandler.scala @@ -6,7 +6,6 @@ import cpw.mods.fml.common.Optional import cpw.mods.fml.common.eventhandler.SubscribeEvent import cpw.mods.fml.common.gameevent.PlayerEvent._ import cpw.mods.fml.common.gameevent.TickEvent -import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent import cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent import cpw.mods.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent import li.cil.oc._ @@ -53,8 +52,6 @@ import scala.concurrent.Future object EventHandler { private val pending = mutable.Buffer.empty[() => Unit] - var totalWorldTicks = 0L - private val runningRobots = mutable.Set.empty[Robot] private val keyboards = java.util.Collections.newSetFromMap[Keyboard](new java.util.WeakHashMap[Keyboard, java.lang.Boolean]) @@ -159,11 +156,6 @@ object EventHandler { machines --= closed } - @SubscribeEvent - def onClientTick(e: ClientTickEvent) = if (e.phase == TickEvent.Phase.START) { - totalWorldTicks += 1 - } - @SubscribeEvent def playerLoggedIn(e: PlayerLoggedInEvent) { if (SideTracker.isServer) e.player match {