From 1a1c04d85aee9ebbf04be24bdc6dffa08e7357a5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 13 Oct 2015 03:43:41 +0200 Subject: [PATCH] Fix booklet saving & opening of intro page --- .../java/ellpeck/actuallyadditions/booklet/GuiBooklet.java | 3 ++- .../util/playerdata/PersistentClientData.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java index 52aafb225..5265867a9 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java @@ -368,7 +368,8 @@ public class GuiBooklet extends GuiScreen{ this.currentChapter = null; this.currentIndexEntry = null; - if(!PersistentClientData.getBoolean("BookAlreadyOpened")){ + //So that the First Page will still open if used via something like NEI before + if(this.parentScreen == null && !PersistentClientData.getBoolean("BookAlreadyOpened")){ this.openIndexEntry(InitBooklet.chapterIntro.entry, 1, true); this.openChapter(InitBooklet.chapterIntro, null); diff --git a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java index 213057335..af0fd30a6 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java +++ b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java @@ -75,7 +75,7 @@ public class PersistentClientData{ } private static String getName(String name){ - return (Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getWorldName() : Minecraft.getMinecraft().func_147104_D().serverIP)+"-"+name; + return (Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().func_147104_D().serverIP)+"-"+name; } public static boolean getBoolean(String name){