Prevent mouse position reset, just inform the server that we are changing the gui

This commit is contained in:
Qowyn committed 2014-09-23 16:42:01 +02:00
1 parent 8d77ab5916
commit 1ccb8a99a4
1 file changed
+4 -1
@@ -3,9 +3,12 @@ package tconstruct.client.tabs;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.*;
import java.util.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.network.play.client.C0DPacketCloseWindow;
import net.minecraftforge.client.event.GuiScreenEvent;
public class TabRegistry
@@ -42,7 +45,7 @@ public class TabRegistry
public static void openInventoryGui ()
{
mc.thePlayer.closeScreen();
mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId));
GuiInventory inventory = new GuiInventory(mc.thePlayer);
mc.displayGuiScreen(inventory);
}