diff --git a/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java b/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java index 0bb840289..f004c982b 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java +++ b/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java @@ -12,7 +12,7 @@ package ellpeck.actuallyadditions.event; import cpw.mods.fml.common.Loader; import ellpeck.actuallyadditions.config.values.ConfigBoolValues; -import ellpeck.actuallyadditions.nei.NeiScreenEvents; +import ellpeck.actuallyadditions.nei.NEIScreenEvents; import ellpeck.actuallyadditions.update.UpdateCheckerClientNotificationEvent; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.Util; @@ -36,7 +36,7 @@ public class InitEvents{ Util.registerEvent(new TooltipEvent()); if(Loader.isModLoaded("NotEnoughItems")){ - Util.registerEvent(new NeiScreenEvents()); + Util.registerEvent(new NEIScreenEvents()); } if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){ diff --git a/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java index 2e642ca3f..b11fafa3c 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java @@ -12,7 +12,7 @@ package ellpeck.actuallyadditions.nei; import net.minecraft.item.ItemStack; -public interface INeiRecipeHandler{ +public interface INEIRecipeHandler{ ItemStack getStackForInfo(int page); } diff --git a/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java b/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java index 513cd18b9..0b1357a8a 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java @@ -28,41 +28,41 @@ public class NEIActuallyAdditionsConfig implements IConfigureNEI{ API.registerGuiOverlay(GuiCrafter.class, "crafting"); API.registerGuiOverlayHandler(GuiCrafter.class, new DefaultOverlayHandler(), "crafting"); - CrusherRecipeHandler crusherRecipeHandler = new CrusherRecipeHandler(); - API.registerRecipeHandler(crusherRecipeHandler); - API.registerUsageHandler(crusherRecipeHandler); + NEICrusherRecipe crusherRecipe = new NEICrusherRecipe(); + API.registerRecipeHandler(crusherRecipe); + API.registerUsageHandler(crusherRecipe); - CrusherRecipeHandler.CrusherDoubleRecipeHandler crusherDoubleRecipeHandler = new CrusherRecipeHandler.CrusherDoubleRecipeHandler(); - API.registerRecipeHandler(crusherDoubleRecipeHandler); - API.registerUsageHandler(crusherDoubleRecipeHandler); + NEICrusherRecipe.Double crusherDoubleRecipe = new NEICrusherRecipe.Double(); + API.registerRecipeHandler(crusherDoubleRecipe); + API.registerUsageHandler(crusherDoubleRecipe); - FurnaceDoubleRecipeHandler furnaceDoubleRecipeHandler = new FurnaceDoubleRecipeHandler(); - API.registerRecipeHandler(furnaceDoubleRecipeHandler); - API.registerUsageHandler(furnaceDoubleRecipeHandler); + NEIFurnaceDoubleRecipe furnaceDoubleRecipe = new NEIFurnaceDoubleRecipe(); + API.registerRecipeHandler(furnaceDoubleRecipe); + API.registerUsageHandler(furnaceDoubleRecipe); - HairyBallRecipeHandler ballRecipeHandler = new HairyBallRecipeHandler(); - API.registerRecipeHandler(ballRecipeHandler); - API.registerUsageHandler(ballRecipeHandler); + NEIHairyBallRecipe ballRecipe = new NEIHairyBallRecipe(); + API.registerRecipeHandler(ballRecipe); + API.registerUsageHandler(ballRecipe); - TreasureChestRecipeHandler treasureRecipeHandler = new TreasureChestRecipeHandler(); - API.registerRecipeHandler(treasureRecipeHandler); - API.registerUsageHandler(treasureRecipeHandler); + NEITreasureChestRecipe treasureChestRecipe = new NEITreasureChestRecipe(); + API.registerRecipeHandler(treasureChestRecipe); + API.registerUsageHandler(treasureChestRecipe); - CompostRecipeHandler compostRecipeHandler = new CompostRecipeHandler(); - API.registerRecipeHandler(compostRecipeHandler); - API.registerUsageHandler(compostRecipeHandler); + NEICompostRecipe compostRecipe = new NEICompostRecipe(); + API.registerRecipeHandler(compostRecipe); + API.registerUsageHandler(compostRecipe); - CoffeeMachineRecipeHandler coffeeMachineRecipeHandler = new CoffeeMachineRecipeHandler(); - API.registerRecipeHandler(coffeeMachineRecipeHandler); - API.registerUsageHandler(coffeeMachineRecipeHandler); + NEICoffeeMachineRecipe coffeeMachineRecipe = new NEICoffeeMachineRecipe(); + API.registerRecipeHandler(coffeeMachineRecipe); + API.registerUsageHandler(coffeeMachineRecipe); - AtomicReconstructorRecipeHandler atomicReconstructorRecipeHandler = new AtomicReconstructorRecipeHandler(); - API.registerRecipeHandler(atomicReconstructorRecipeHandler); - API.registerUsageHandler(atomicReconstructorRecipeHandler); + NEIReconstructorRecipe reconstructorRecipe = new NEIReconstructorRecipe(); + API.registerRecipeHandler(reconstructorRecipe); + API.registerUsageHandler(reconstructorRecipe); - BookletInfoRecipeHandler bookletInfoRecipeHandler = new BookletInfoRecipeHandler(); - API.registerRecipeHandler(bookletInfoRecipeHandler); - API.registerUsageHandler(bookletInfoRecipeHandler); + NEIBookletRecipe bookletRecipe = new NEIBookletRecipe(); + API.registerRecipeHandler(bookletRecipe); + API.registerUsageHandler(bookletRecipe); API.hideItem(new ItemStack(InitBlocks.blockRice)); API.hideItem(new ItemStack(InitBlocks.blockCanola)); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEIBookletRecipe.java similarity index 96% rename from src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEIBookletRecipe.java index 13a18d5ae..4402c1456 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEIBookletRecipe.java @@ -30,11 +30,11 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.List; -public class BookletInfoRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEIBookletRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.booklet"; - public BookletInfoRecipeHandler(){ + public NEIBookletRecipe(){ RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -51,7 +51,7 @@ public class BookletInfoRecipeHandler extends TemplateRecipeHandler implements I @SuppressWarnings("unchecked") @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == BookletInfoRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEIBookletRecipe.class){ for(BookletPage page : InitBooklet.pagesWithItemStackData){ for(ItemStack stack : page.getItemStacksForPage()){ arecipes.add(new CachedInfoStack(stack)); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEICoffeeMachineRecipe.java similarity index 96% rename from src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEICoffeeMachineRecipe.java index e3d11ec77..1b4d65d5f 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEICoffeeMachineRecipe.java @@ -32,11 +32,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class CoffeeMachineRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEICoffeeMachineRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.coffee"; - public CoffeeMachineRecipeHandler(){ + public NEICoffeeMachineRecipe(){ super(); RecipeInfo.setGuiOffset(this.getGuiClass(), 35, 3); } @@ -54,7 +54,7 @@ public class CoffeeMachineRecipeHandler extends TemplateRecipeHandler implements @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == CoffeeMachineRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEICoffeeMachineRecipe.class){ ArrayList ingredients = ItemCoffee.ingredients; for(ItemCoffee.Ingredient ingredient : ingredients){ arecipes.add(new CachedCoffee(ingredient)); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEICompostRecipe.java similarity index 95% rename from src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEICompostRecipe.java index b4bc8488a..a0dcd9f1d 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEICompostRecipe.java @@ -28,11 +28,11 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.Collections; -public class CompostRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEICompostRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.compost"; - public CompostRecipeHandler(){ + public NEICompostRecipe(){ super(); RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -54,7 +54,7 @@ public class CompostRecipeHandler extends TemplateRecipeHandler implements INeiR @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == CompostRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEICompostRecipe.class){ arecipes.add(new CachedCompostRecipe(new ItemStack(InitItems.itemMisc, ConfigIntValues.COMPOST_AMOUNT.getValue(), TheMiscItems.MASHED_FOOD.ordinal()), new ItemStack(InitItems.itemFertilizer, ConfigIntValues.COMPOST_AMOUNT.getValue()))); } else{ diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEICrusherRecipe.java similarity index 91% rename from src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEICrusherRecipe.java index dd20955ab..76b00a573 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEICrusherRecipe.java @@ -29,9 +29,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class CrusherRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ - public CrusherRecipeHandler(){ + public NEICrusherRecipe(){ RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -47,7 +47,7 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler implements INeiR @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(this.getName()) && (getClass() == CrusherRecipeHandler.class || getClass() == CrusherDoubleRecipeHandler.class)){ + if(outputId.equals(this.getName()) && (getClass() == NEICrusherRecipe.class || getClass() == Double.class)){ for(CrusherRecipeRegistry.CrusherRecipe recipe : CrusherRecipeRegistry.recipes){ arecipes.add(new CachedCrush(recipe.getRecipeInputs(), recipe.getRecipeOutputOnes(), recipe.getRecipeOutputTwos(), recipe.outputTwoChance, this)); } @@ -120,7 +120,7 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler implements INeiR } protected String getName(){ - return "actuallyadditions."+(this instanceof CrusherDoubleRecipeHandler ? "crushingDouble" : "crushing"); + return "actuallyadditions."+(this instanceof Double ? "crushingDouble" : "crushing"); } @Override @@ -128,7 +128,7 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler implements INeiR return StringUtil.localize("container.nei."+this.getName()+".name"); } - public static class CrusherDoubleRecipeHandler extends CrusherRecipeHandler{ + public static class Double extends NEICrusherRecipe{ @Override public ItemStack getStackForInfo(int page){ @@ -172,8 +172,8 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler implements INeiR public PositionedStack resultTwo; public int secondChance; - public CachedCrush(List in, List outOne, List outTwo, int secondChance, CrusherRecipeHandler handler){ - boolean isDouble = handler instanceof CrusherDoubleRecipeHandler; + public CachedCrush(List in, List outOne, List outTwo, int secondChance, NEICrusherRecipe handler){ + boolean isDouble = handler instanceof Double; this.ingredient = new PositionedStack(in, isDouble ? 51 : 80, 21); this.resultOne = new PositionedStack(outOne, isDouble ? 38 : 66, 69); if(outTwo != null && !outTwo.isEmpty()){ diff --git a/src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEIFurnaceDoubleRecipe.java similarity index 95% rename from src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEIFurnaceDoubleRecipe.java index 6838ce0c3..c0b56d87d 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEIFurnaceDoubleRecipe.java @@ -29,11 +29,11 @@ import java.util.Collections; import java.util.List; import java.util.Map; -public class FurnaceDoubleRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEIFurnaceDoubleRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.furnaceDouble"; - public FurnaceDoubleRecipeHandler(){ + public NEIFurnaceDoubleRecipe(){ RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -51,7 +51,7 @@ public class FurnaceDoubleRecipeHandler extends TemplateRecipeHandler implements @SuppressWarnings("unchecked") @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == FurnaceDoubleRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEIFurnaceDoubleRecipe.class){ Map recipes = (Map)FurnaceRecipes.smelting().getSmeltingList(); for(Map.Entry recipe : recipes.entrySet()){ arecipes.add(new CachedFurn(recipe.getKey(), recipe.getValue())); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEIHairyBallRecipe.java similarity index 95% rename from src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEIHairyBallRecipe.java index 94ed760c6..ec19b1712 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEIHairyBallRecipe.java @@ -27,11 +27,11 @@ import java.awt.*; import java.util.ArrayList; import java.util.Collections; -public class HairyBallRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEIHairyBallRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.ballOfHair"; - public HairyBallRecipeHandler(){ + public NEIHairyBallRecipe(){ super(); RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -53,7 +53,7 @@ public class HairyBallRecipeHandler extends TemplateRecipeHandler implements INe @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == HairyBallRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEIHairyBallRecipe.class){ ArrayList recipes = HairyBallHandler.returns; for(HairyBallHandler.Return recipe : recipes){ arecipes.add(new CachedBallRecipe(recipe.inputItem, recipe.returnItem, recipe.itemWeight)); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEIREconstructorRecipe.java similarity index 95% rename from src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEIREconstructorRecipe.java index 86ef81bbd..cbaef4c9c 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEIREconstructorRecipe.java @@ -31,11 +31,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class AtomicReconstructorRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEIReconstructorRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.reconstructor"; - public AtomicReconstructorRecipeHandler(){ + public NEIReconstructorRecipe(){ super(); RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -57,7 +57,7 @@ public class AtomicReconstructorRecipeHandler extends TemplateRecipeHandler impl @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == AtomicReconstructorRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEIReconstructorRecipe.class){ ArrayList recipes = ReconstructorRecipeHandler.recipes; for(ReconstructorRecipeHandler.Recipe recipe : recipes){ arecipes.add(new CachedReconstructorRecipe(recipe.input, recipe.output, recipe.type.lens)); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/NEITreasureChestRecipe.java similarity index 95% rename from src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java rename to src/main/java/ellpeck/actuallyadditions/nei/NEITreasureChestRecipe.java index b8e29ecb9..4961bb07e 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEITreasureChestRecipe.java @@ -27,11 +27,11 @@ import java.awt.*; import java.util.ArrayList; import java.util.Collections; -public class TreasureChestRecipeHandler extends TemplateRecipeHandler implements INeiRecipeHandler{ +public class NEITreasureChestRecipe extends TemplateRecipeHandler implements INEIRecipeHandler{ public static final String NAME = "actuallyadditions.treasureChest"; - public TreasureChestRecipeHandler(){ + public NEITreasureChestRecipe(){ super(); RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); } @@ -53,7 +53,7 @@ public class TreasureChestRecipeHandler extends TemplateRecipeHandler implements @Override public void loadCraftingRecipes(String outputId, Object... results){ - if(outputId.equals(NAME) && getClass() == TreasureChestRecipeHandler.class){ + if(outputId.equals(NAME) && getClass() == NEITreasureChestRecipe.class){ ArrayList recipes = TreasureChestHandler.returns; for(TreasureChestHandler.Return recipe : recipes){ arecipes.add(new CachedTreasure(recipe.input, recipe.returnItem, recipe.itemWeight, recipe.minAmount, recipe.maxAmount)); diff --git a/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java b/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java index 84c392d0e..975682327 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java @@ -23,7 +23,7 @@ import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.GuiScreenEvent; -public class NeiScreenEvents{ +public class NEIScreenEvents{ private static final int NEI_BUTTON_ID = 123782; private BookletUtils.TexturedButton neiButton; @@ -52,7 +52,7 @@ public class NeiScreenEvents{ event.buttonList.add(this.neiButton); IRecipeHandler handler = theGui.getCurrentRecipeHandlers().get(theGui.recipetype); - this.neiButton.visible = handler instanceof INeiRecipeHandler && ((INeiRecipeHandler)handler).getStackForInfo(theGui.page) != null; + this.neiButton.visible = handler instanceof INEIRecipeHandler && ((INEIRecipeHandler)handler).getStackForInfo(theGui.page) != null; } } @@ -62,12 +62,12 @@ public class NeiScreenEvents{ GuiRecipe theGui = (GuiRecipe)event.gui; IRecipeHandler handler = theGui.getCurrentRecipeHandlers().get(theGui.recipetype); - boolean isPage = handler instanceof INeiRecipeHandler && ((INeiRecipeHandler)handler).getStackForInfo(theGui.page) != null; + boolean isPage = handler instanceof INEIRecipeHandler && ((INEIRecipeHandler)handler).getStackForInfo(theGui.page) != null; this.neiButton.visible = isPage; if(isPage && event.button.id == NEI_BUTTON_ID){ for(BookletPage page : InitBooklet.pagesWithItemStackData){ - if(ItemUtil.contains(page.getItemStacksForPage(), ((INeiRecipeHandler)handler).getStackForInfo(theGui.page), true)){ + if(ItemUtil.contains(page.getItemStacksForPage(), ((INEIRecipeHandler)handler).getStackForInfo(theGui.page), true)){ GuiBooklet book = new GuiBooklet(Minecraft.getMinecraft().currentScreen, false, true); Minecraft.getMinecraft().displayGuiScreen(book); BookletUtils.openIndexEntry(book, page.getChapter().entry, InitBooklet.entries.indexOf(page.getChapter().entry)/GuiBooklet.CHAPTER_BUTTONS_AMOUNT+1, true);