From 48fce4e3b1f6a0045c21cd8e336ba2675bc1c2c9 Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Wed, 12 Aug 2015 22:41:51 -0400 Subject: [PATCH] Fix guiskins constantly updating --- .../java/com/minelittlepony/minelp/MineLittlePony.java | 10 ++++++---- .../java/com/voxelmodpack/hdskins/gui/GuiSkins.java | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/minelittlepony/minelp/MineLittlePony.java b/src/main/java/com/minelittlepony/minelp/MineLittlePony.java index 30dee6d9..49f9bf45 100644 --- a/src/main/java/com/minelittlepony/minelp/MineLittlePony.java +++ b/src/main/java/com/minelittlepony/minelp/MineLittlePony.java @@ -155,15 +155,17 @@ public class MineLittlePony implements InitCompleteListener { this.ponyManager.setShowSnuzzles(this.config.getIntPropertySafe("snuzzles")); this.ponyManager.setShowScale(this.config.getIntPropertySafe("showscale")); if (inGame && minecraft.currentScreen == null && guiKeybinding.isPressed()) { - minecraft.displayGuiScreen(new MineLittlePonyGUI()); + minecraft.displayGuiScreen(new MineLittlePonyGUI()); } // if (Keyboard.isKeyDown(Keyboard.KEY_O)) { // ponyManager.initmodels(); // } - if (!inGame && minecraft.currentScreen != null - && (minecraft.currentScreen instanceof GuiMainMenu && Keyboard.isKeyDown(skinKeybinding.getKeyCode()) - || minecraft.currentScreen instanceof GuiSkins)) { + boolean pressed = minecraft.currentScreen instanceof GuiMainMenu + && Keyboard.isKeyDown(skinKeybinding.getKeyCode()); + boolean skins = minecraft.currentScreen instanceof GuiSkins + && !(minecraft.currentScreen instanceof GuiSkinsMineLP); + if (pressed || skins) { minecraft.displayGuiScreen(new GuiSkinsMineLP()); } diff --git a/src/main/java/com/voxelmodpack/hdskins/gui/GuiSkins.java b/src/main/java/com/voxelmodpack/hdskins/gui/GuiSkins.java index d29b5154..3647bc00 100644 --- a/src/main/java/com/voxelmodpack/hdskins/gui/GuiSkins.java +++ b/src/main/java/com/voxelmodpack/hdskins/gui/GuiSkins.java @@ -121,8 +121,8 @@ public class GuiSkins extends GuiScreen implements IUploadCompleteCallback, IOpe Minecraft minecraft = Minecraft.getMinecraft(); this.screenTitle = manager; GameProfile profile = minecraft.getSession().getProfile(); - this.localPlayer = new EntityPlayerModel(profile); - this.remotePlayer = new EntityPlayerModel(profile); + this.localPlayer = getModel(profile); + this.remotePlayer = getModel(profile); RenderManager rm = Minecraft.getMinecraft().getRenderManager(); rm.renderEngine = minecraft.getTextureManager(); rm.options = minecraft.gameSettings;