mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
The first time you open the Lexica Botania you'll be taken to the "Welcome to Botania" entry.
This commit is contained in:
1 parent
418c0d0bf7
commit
d0dfe56286
2 files changed
+10
No files matched your search
@@ -19,6 +19,8 @@ import java.util.List;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexiconEntry;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
public final class PresistantVariableHelper {
|
||||
|
||||
@@ -66,6 +68,8 @@ public final class PresistantVariableHelper {
|
||||
}
|
||||
|
||||
firstLoad = cmp.hasKey(TAG_FIRST_LOAD) ? cmp.getBoolean(TAG_FIRST_LOAD) : firstLoad;
|
||||
if(firstLoad)
|
||||
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(LexiconData.welcome, new GuiLexicon());
|
||||
}
|
||||
|
||||
public static void saveSafe() {
|
||||
|
||||
@@ -27,6 +27,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -90,6 +91,11 @@ public class GuiLexicon extends GuiScreen {
|
||||
public final void initGui() {
|
||||
super.initGui();
|
||||
|
||||
if(PresistantVariableHelper.firstLoad) {
|
||||
PresistantVariableHelper.firstLoad = false;
|
||||
PresistantVariableHelper.saveSafe();
|
||||
}
|
||||
|
||||
onInitGui();
|
||||
|
||||
putTutorialArrow();
|
||||
|
||||
Reference in new issue
Block a user