This commit is contained in:
Florian Nücke 2016-02-24 20:22:19 +01:00
parent 49a0f8560c
commit 0613237fc6

View File

@ -10,7 +10,6 @@ import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent
import li.cil.oc.api.event.RobotRenderEvent import li.cil.oc.api.event.RobotRenderEvent
import li.cil.oc.client.renderer.tileentity.RobotRenderer import li.cil.oc.client.renderer.tileentity.RobotRenderer
import net.minecraft.client.Minecraft import net.minecraft.client.Minecraft
import net.minecraft.client.gui.inventory.GuiContainer
import net.minecraft.entity.Entity import net.minecraft.entity.Entity
import net.minecraftforge.client.event.RenderPlayerEvent import net.minecraftforge.client.event.RenderPlayerEvent
import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11
@ -143,11 +142,7 @@ object PetRenderer {
GL11.glTranslated(0.3, -0.1, -0.2) GL11.glTranslated(0.3, -0.1, -0.2)
} }
//Sangar: Someone please tell me a cleaner solution than this... private def isForInventory = Minecraft.getMinecraft.currentScreen != null && owner == Minecraft.getMinecraft.thePlayer
//tim4242: This seems to be cleaner, but what do I know?
private def isForInventory = Minecraft.getMinecraft.currentScreen != null && owner == Minecraft.getMinecraft.thePlayer //Check if the player is currently in an inventory
//private def isForInventory = new Exception().getStackTrace.exists(_.getClassName == classOf[GuiContainer].getName)
} }
@SubscribeEvent @SubscribeEvent