From 6648fb29e2c7148bb20e8be33ad1bc6d8e3024b3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 12 Nov 2016 16:17:11 +0100 Subject: [PATCH] Made bookmark buttons only open when the page isn't already open --- .../actuallyadditions/mod/booklet/button/BookmarkButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java index 6f807240c..d1868401c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/button/BookmarkButton.java @@ -45,7 +45,7 @@ public class BookmarkButton extends GuiButton{ if(GuiScreen.isShiftKeyDown()){ this.assignedPage = null; } - else{ + else if(!(this.booklet instanceof GuiPage) || ((GuiPage)this.booklet).pages[0] != this.assignedPage){ GuiPage gui = BookletUtils.createPageGui(this.booklet.previousScreen, this.booklet, this.assignedPage); Minecraft.getMinecraft().displayGuiScreen(gui); }