diff --git a/src/main/java/com/minelittlepony/LiteModMineLittlePony.java b/src/main/java/com/minelittlepony/LiteModMineLittlePony.java index cc40502a..3bf014c9 100644 --- a/src/main/java/com/minelittlepony/LiteModMineLittlePony.java +++ b/src/main/java/com/minelittlepony/LiteModMineLittlePony.java @@ -3,6 +3,7 @@ package com.minelittlepony; import com.minelittlepony.gui.PonySettingsPanel; import com.mumfrey.liteloader.Configurable; import com.mumfrey.liteloader.InitCompleteListener; +import com.mumfrey.liteloader.Tickable; import com.mumfrey.liteloader.core.LiteLoader; import com.mumfrey.liteloader.modconfig.ConfigPanel; @@ -10,7 +11,7 @@ import net.minecraft.client.Minecraft; import java.io.File; -public class LiteModMineLittlePony implements InitCompleteListener, Configurable { +public class LiteModMineLittlePony implements InitCompleteListener, Tickable, Configurable { private MineLittlePony mlp; @@ -38,6 +39,11 @@ public class LiteModMineLittlePony implements InitCompleteListener, Configurable mlp.postInit(minecraft); } + @Override + public void onTick(Minecraft minecraft, float partialTicks, boolean inGame, boolean clock) { + mlp.onTick(minecraft, inGame); + } + @Override public Class getConfigPanelClass() { return PonySettingsPanel.class; diff --git a/src/main/java/com/minelittlepony/MineLittlePony.java b/src/main/java/com/minelittlepony/MineLittlePony.java index 9b7786e2..a031beff 100644 --- a/src/main/java/com/minelittlepony/MineLittlePony.java +++ b/src/main/java/com/minelittlepony/MineLittlePony.java @@ -1,5 +1,6 @@ package com.minelittlepony; +import com.minelittlepony.gui.GuiPonySettings; import com.minelittlepony.hdskins.gui.GuiSkinsMineLP; import com.minelittlepony.pony.data.IPonyData; import com.minelittlepony.pony.data.PonyDataSerialzier; @@ -77,6 +78,12 @@ public class MineLittlePony { renderManager.initializeMobRenderers(rm, config); } + void onTick(Minecraft minecraft, boolean inGame) { + if (inGame && minecraft.currentScreen == null && SETTINGS_GUI.isPressed()) { + minecraft.displayGuiScreen(new GuiPonySettings()); + } + } + /** * Gets the global MineLP instance. */