diff options
author | syeyoung <cyong06@naver.com> | 2021-05-23 17:42:47 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-05-23 17:42:47 +0900 |
commit | 9fcc651c79aac7a13e7f59a09d11cb27be97a29c (patch) | |
tree | 3e1161191b75bc94ac3b2c663e549986c6680e58 /src/main/java/kr/syeyoung | |
parent | bd37606a7fd3f46606b0eded6faa48131ae0a406 (diff) | |
download | Skyblock-Dungeons-Guide-9fcc651c79aac7a13e7f59a09d11cb27be97a29c.tar.gz Skyblock-Dungeons-Guide-9fcc651c79aac7a13e7f59a09d11cb27be97a29c.tar.bz2 Skyblock-Dungeons-Guide-9fcc651c79aac7a13e7f59a09d11cb27be97a29c.zip |
Add one more line to dg session invalid crash
Diffstat (limited to 'src/main/java/kr/syeyoung')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java index 19daebc5..2fc96a82 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java @@ -60,6 +60,8 @@ import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.client.CustomModLoadingErrorDisplayException; +import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent; @@ -146,7 +148,8 @@ public class DungeonListener { final String[] a = new String[]{ "User has changed current Minecraft session.", - "Please restart mc to revalidate Dungeons Guide" + "Please restart mc to revalidate Dungeons Guide", + "Hopefully this screen will be fixed in later release" }; final GuiScreen b = new GuiErrorScreen(null, null) { @Override @@ -166,7 +169,7 @@ public class DungeonListener { @Override protected void actionPerformed(GuiButton button) throws IOException { - System.exit(-1); + FMLCommonHandler.instance().exitJava(-1,true); } }; Minecraft.getMinecraft().displayGuiScreen(b); @@ -244,18 +247,6 @@ public class DungeonListener { try { if (postRender.type != RenderGameOverlayEvent.ElementType.ALL) return; - JsonObject obj = DungeonsGuide.getDungeonsGuide().getAuthenticator().getJwtPayload(DungeonsGuide.getDungeonsGuide().getAuthenticator().getToken()); - FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; - if (obj.get("plan").getAsString().equalsIgnoreCase("TRIAL")) { - - GlStateManager.enableBlend(); - GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); - GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); - fr.drawString("Using trial Version of Dungeons Guide", 0,0, 0xFFFFFFFF); - fr.drawString("Trial version bound to: "+obj.get("nickname").getAsString(), 0,10, 0xFFFFFFFF); - } - - SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; |