From 30849fb304f0d94481a42ee439b0efe8e3dff412 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 12 Nov 2016 00:29:01 +0100 Subject: [PATCH] Finished all page types --- .../booklet/chapter/BookletChapterCoffee.java | 27 ++++++++- .../chapter/BookletChapterCrusher.java | 22 ++++++- .../mod/booklet/gui/GuiBooklet.java | 2 +- .../mod/booklet/gui/GuiMainPage.java | 2 +- .../mod/booklet/gui/GuiPage.java | 2 +- .../mod/booklet/page/PageCoffeeMachine.java | 57 ++++++++++++++++++ .../mod/booklet/page/PageCrusherRecipe.java | 31 +++++++++- .../mod/booklet/page/PageEmpowerer.java | 32 +++++++++- .../mod/booklet/page/PageFurnace.java | 41 ++++++++++++- .../mod/booklet/page/PageLinkButton.java | 43 ++++++++++++- .../mod/booklet/page/PagePicture.java | 21 ++++++- .../mod/booklet/page/PageReconstructor.java | 32 +++++++++- .../mod/util/StringUtil.java | 2 +- .../assets/actuallyadditions/lang/en_US.lang | 2 +- .../gui/booklet/guiBookletGadgets.png | Bin 3295 -> 5467 bytes 15 files changed, 301 insertions(+), 15 deletions(-) create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java index e3d81dfc7..8e0c18289 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCoffee.java @@ -10,14 +10,37 @@ package de.ellpeck.actuallyadditions.mod.booklet.chapter; +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; +import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; +import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage; +import de.ellpeck.actuallyadditions.mod.booklet.page.PageCoffeeMachine; +import de.ellpeck.actuallyadditions.mod.items.ItemCoffee; import net.minecraft.item.ItemStack; -//TODO +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + public class BookletChapterCoffee extends BookletChapter{ public BookletChapterCoffee(String identifier, IBookletEntry entry, ItemStack displayStack, IBookletPage... pages){ - super(identifier, entry, displayStack, pages); + super(identifier, entry, displayStack, getPages(pages)); + } + + private static IBookletPage[] getPages(IBookletPage... pages){ + List allPages = new ArrayList(); + allPages.addAll(Arrays.asList(pages)); + + for(CoffeeIngredient ingredient : ActuallyAdditionsAPI.COFFEE_MACHINE_INGREDIENTS){ + BookletPage page = new PageCoffeeMachine(allPages.size()+1, ingredient); + if(!(ingredient instanceof ItemCoffee.MilkIngredient)){ + page.setNoText(); + } + allPages.add(page); + } + + return allPages.toArray(new IBookletPage[allPages.size()]); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java index 0f7a602b7..305e5dfe9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/chapter/BookletChapterCrusher.java @@ -12,12 +12,30 @@ package de.ellpeck.actuallyadditions.mod.booklet.chapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; +import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; +import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage; +import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting; import net.minecraft.item.ItemStack; -//TODO +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + public class BookletChapterCrusher extends BookletChapter{ public BookletChapterCrusher(String identifier, IBookletEntry entry, ItemStack displayStack, IBookletPage... pages){ - super(identifier, entry, displayStack, pages); + super(identifier, entry, displayStack, getPages(pages)); + } + + private static IBookletPage[] getPages(IBookletPage... pages){ + List allPages = new ArrayList(); + allPages.addAll(Arrays.asList(pages)); + + for(CrusherRecipe recipe : CrusherCrafting.MISC_RECIPES){ + allPages.add(new PageCrusherRecipe(allPages.size()+1, recipe).setNoText()); + } + + return allPages.toArray(new IBookletPage[allPages.size()]); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java index 6f7744d6b..4a19654e0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java @@ -70,7 +70,7 @@ public abstract class GuiBooklet extends GuiBookletBase{ } if(this.hasBackButton()){ - this.buttonBack = new TexturedButton(RES_LOC_GADGETS, -2002, this.guiLeft-12, this.guiTop-2, 36, 54, 18, 10); + this.buttonBack = new TexturedButton(RES_LOC_GADGETS, -2002, this.guiLeft-15, this.guiTop-3, 36, 54, 18, 10); this.buttonList.add(this.buttonBack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java index eaca29af9..315622cef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java @@ -35,7 +35,7 @@ public class GuiMainPage extends GuiBooklet{ for(int i = 0; i < BUTTONS_PER_PAGE; i++){ if(ActuallyAdditionsAPI.BOOKLET_ENTRIES.size() > i){ IBookletEntry entry = ActuallyAdditionsAPI.BOOKLET_ENTRIES.get(i); - this.buttonList.add(new EntryButton(i, this.guiLeft+156, this.guiTop+11+i*16, 115, 10, entry.getLocalizedNameWithFormatting(), null)); + this.buttonList.add(new EntryButton(i, this.guiLeft+156, this.guiTop+11+i*13, 115, 10, "- "+entry.getLocalizedNameWithFormatting(), null)); } else{ return; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java index 38e2e5dba..dc55c6c3a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiPage.java @@ -190,7 +190,7 @@ public class GuiPage extends GuiBooklet{ if(chapter != null){ int pageIndex = chapter.getPageIndex(page); int pageAmount = chapter.getAllPages().length; - return pageIndex+1 < pageAmount-1; + return pageIndex+1 < pageAmount; } } return false; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java new file mode 100644 index 000000000..499f2e095 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeMachine.java @@ -0,0 +1,57 @@ +/* + * This file ("PageCoffeeMachine.java") is part of the Actually Additions mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015-2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.booklet.page; + +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; +import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; +import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; +import de.ellpeck.actuallyadditions.mod.items.InitItems; +import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.client.config.GuiUtils; + +public class PageCoffeeMachine extends BookletPage{ + + private final CoffeeIngredient ingredient; + + public PageCoffeeMachine(int localizationKey, CoffeeIngredient ingredient){ + super(localizationKey); + this.ingredient = ingredient; + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + + gui.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); + GuiUtils.drawTexturedModalRect(startX+5, startY+10, 0, 74, 117, 72, 0); + + gui.renderScaledAsciiString("(Coffee Maker Recipe)", startX+6, startY+78, 0, false, 0.65F); + gui.renderSplitScaledAsciiString("Hover over this to see the effect!", startX+5, startY+51, 0, false, 0.5F, 35); + + PageTextOnly.renderTextToPage(gui, this, startX+6, startY+90); + } + + @Override + public void initGui(GuiBookletBase gui, int startX, int startY){ + super.initGui(gui, startX, startY); + + gui.addOrModifyItemRenderer(this.ingredient.ingredient, startX+5+82, startY+10+1, 1F, true); + + ItemStack coffee = new ItemStack(InitItems.itemCoffee); + ActuallyAdditionsAPI.methodHandler.addEffectToStack(coffee, this.ingredient); + gui.addOrModifyItemRenderer(coffee, startX+5+36, startY+10+42, 1F, false); + + gui.addOrModifyItemRenderer(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), startX+5+37, startY+10+1, 1F, true); + gui.addOrModifyItemRenderer(new ItemStack(InitItems.itemCoffee), startX+5+1, startY+10+1, 1F, true); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java index a940eabcf..b5df1b9e1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java @@ -10,12 +10,41 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; +import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; +import net.minecraftforge.fml.client.config.GuiUtils; -//TODO public class PageCrusherRecipe extends BookletPage{ + private final CrusherRecipe recipe; + public PageCrusherRecipe(int localizationKey, CrusherRecipe recipe){ super(localizationKey); + this.recipe = recipe; + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + + gui.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); + GuiUtils.drawTexturedModalRect(startX+38, startY+6, 136, 0, 52, 74, 0); + + gui.renderScaledAsciiString("(Crusher Recipe)", startX+36, startY+85, 0, false, 0.65F); + + PageTextOnly.renderTextToPage(gui, this, startX+6, startY+100); + } + + @Override + public void initGui(GuiBookletBase gui, int startX, int startY){ + super.initGui(gui, startX, startY); + + gui.addOrModifyItemRenderer(this.recipe.inputStack, startX+38+18, startY+6+2, 1F, true); + gui.addOrModifyItemRenderer(this.recipe.outputOneStack, startX+38+4, startY+6+53, 1F, false); + + if(this.recipe.outputTwoStack != null){ + gui.addOrModifyItemRenderer(this.recipe.outputTwoStack, startX+38+30, startY+6+53, 1F, false); + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java index 07274998d..a34e613ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java @@ -10,12 +10,42 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; +import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; +import net.minecraftforge.fml.client.config.GuiUtils; -//TODO public class PageEmpowerer extends BookletPage{ + private final EmpowererRecipe recipe; + public PageEmpowerer(int localizationKey, EmpowererRecipe recipe){ super(localizationKey); + this.recipe = recipe; + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + + gui.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); + GuiUtils.drawTexturedModalRect(startX+5, startY+10, 117, 74, 116, 72, 0); + + gui.renderScaledAsciiString("(Empowerer Recipe)", startX+6, startY+85, 0, false, 0.65F); + + PageTextOnly.renderTextToPage(gui, this, startX+6, startY+100); + } + + @Override + public void initGui(GuiBookletBase gui, int startX, int startY){ + super.initGui(gui, startX, startY); + + gui.addOrModifyItemRenderer(this.recipe.modifier1, startX+5+26, startY+10+1, 1F, true); + gui.addOrModifyItemRenderer(this.recipe.modifier2, startX+5+1, startY+10+26, 1F, true); + gui.addOrModifyItemRenderer(this.recipe.modifier3, startX+5+51, startY+10+26, 1F, true); + gui.addOrModifyItemRenderer(this.recipe.modifier4, startX+5+26, startY+10+51, 1F, true); + + gui.addOrModifyItemRenderer(this.recipe.input, startX+5+26, startY+10+26, 1F, true); + gui.addOrModifyItemRenderer(this.recipe.output, startX+5+96, startY+10+26, 1F, false); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java index b33cfb27b..eaf98ef1e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java @@ -10,12 +10,51 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; +import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.fml.client.config.GuiUtils; + +import java.util.Map; -//TODO public class PageFurnace extends BookletPage{ + private final ItemStack input; + private final ItemStack output; + public PageFurnace(int localizationKey, ItemStack output){ super(localizationKey); + this.output = output; + this.input = getInputForOutput(output); + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + + gui.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); + GuiUtils.drawTexturedModalRect(startX+23, startY+10, 0, 146, 80, 26, 0); + + gui.renderScaledAsciiString("(Furnace Recipe)", startX+32, startY+42, 0, false, 0.65F); + + PageTextOnly.renderTextToPage(gui, this, startX+6, startY+57); + } + + @Override + public void initGui(GuiBookletBase gui, int startX, int startY){ + super.initGui(gui, startX, startY); + + gui.addOrModifyItemRenderer(this.input, startX+23+1, startY+10+5, 1F, true); + gui.addOrModifyItemRenderer(this.output, startX+23+59, startY+10+5, 1F, false); + } + + private static ItemStack getInputForOutput(ItemStack output){ + for(Map.Entry entry : FurnaceRecipes.instance().getSmeltingList().entrySet()){ + if(entry.getValue().isItemEqual(output)){ + return entry.getKey(); + } + } + return null; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java index 02ec3d43b..056865841 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageLinkButton.java @@ -10,10 +10,51 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -//TODO +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import net.minecraft.client.gui.GuiButton; + +import java.awt.*; +import java.net.URI; + public class PageLinkButton extends BookletPage{ + private static final int BUTTON_ID = -12782; + private final String link; + public PageLinkButton(int localizationKey, String link){ super(localizationKey); + this.link = link; + } + + @Override + public void initGui(GuiBookletBase gui, int startX, int startY){ + super.initGui(gui, startX, startY); + + gui.getButtonList().add(new GuiButton(BUTTON_ID, startX+125/2-50, startY+130, 100, 20, StringUtil.localize("booklet."+ModUtil.MOD_ID+".chapter."+this.chapter.getIdentifier()+".button."+this.localizationKey))); + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + PageTextOnly.renderTextToPage(gui, this, startX+6, startY+5); + } + + @Override + public void actionPerformed(GuiBookletBase gui, GuiButton button){ + if(button.id == BUTTON_ID){ + if(Desktop.isDesktopSupported()){ + try{ + Desktop.getDesktop().browse(new URI(this.link)); + } + catch(Exception e){ + ModUtil.LOGGER.info("Couldn't open website from Link Button page!", e); + } + } + } + else{ + super.actionPerformed(gui, button); + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java index eed4d7ab2..f32edbbf2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java @@ -10,10 +10,29 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; -//TODO +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; +import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.config.GuiUtils; + public class PagePicture extends BookletPage{ + private final ResourceLocation resLoc; + private final int yTextOffset; + public PagePicture(int localizationKey, String pictureLocation, int yTextOffset){ super(localizationKey); + this.yTextOffset = yTextOffset; + this.resLoc = AssetUtil.getBookletGuiLocation(pictureLocation); + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + + gui.mc.getTextureManager().bindTexture(this.resLoc); + GuiUtils.drawTexturedModalRect(startX-6, startY-7, 0, 0, 256, 256, 0); + + PageTextOnly.renderTextToPage(gui, this, startX+6, startY-7+this.yTextOffset); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java index e1a80c76b..77e8fb5e3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java @@ -10,12 +10,42 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; +import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; +import de.ellpeck.actuallyadditions.api.lens.LensConversion; import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; +import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; +import de.ellpeck.actuallyadditions.mod.items.InitItems; +import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.client.config.GuiUtils; -//TODO public class PageReconstructor extends BookletPage{ + private final LensConversionRecipe recipe; + public PageReconstructor(int localizationKey, LensConversionRecipe recipe){ super(localizationKey); + this.recipe = recipe; + } + + @Override + public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks){ + super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); + + gui.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); + GuiUtils.drawTexturedModalRect(startX+30, startY+10, 80, 146, 68, 48, 0); + + gui.renderScaledAsciiString("(Atomic Reconstructor Recipe)", startX+12, startY+63, 0, false, 0.65F); + + PageTextOnly.renderTextToPage(gui, this, startX+6, startY+88); + } + + @Override + public void initGui(GuiBookletBase gui, int startX, int startY){ + super.initGui(gui, startX, startY); + + gui.addOrModifyItemRenderer(this.recipe.inputStack, startX+30+1, startY+10+13, 1F, true); + gui.addOrModifyItemRenderer(this.recipe.outputStack, startX+30+47, startY+10+13, 1F, false); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java index 2a9b942b0..3cabd1a7c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java @@ -70,7 +70,7 @@ public final class StringUtil{ public static void renderSplitScaledAsciiString(FontRenderer font, String text, int x, int y, int color, boolean shadow, float scale, int length){ List lines = font.listFormattedStringToWidth(text, (int)(length/scale)); for(int i = 0; i < lines.size(); i++){ - renderScaledAsciiString(font, lines.get(i), x, y+(i*font.FONT_HEIGHT), color, shadow, scale); + renderScaledAsciiString(font, lines.get(i), x, y+(i*(int)(font.FONT_HEIGHT*scale+3)), color, shadow, scale); } } } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 566047a2e..d12660730 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -1017,7 +1017,7 @@ booklet.actuallyadditions.chapter.itemFilter.text.1=The Item Filter can booklet.actuallyadditions.chapter.videoGuide.name=A Video Guide booklet.actuallyadditions.chapter.videoGuide.text.1=If you want to have a visual introduction to see what Actually Additions has to offer, you can watch this really awesome video by a friend of mine, Booty Toast (yes, weird name, I know). His video covers most of the main stuff the mod has to offer, however it is a bit outdated and doesn't cover everything. It's still a great introduction to the mod though. -booklet.actuallyadditions.chapter.videoGuide.page.1.button=Watch Video +booklet.actuallyadditions.chapter.videoGuide.button.1=Watch Video booklet.actuallyadditions.chapter.shockSuppressor.name=Shock Absorber booklet.actuallyadditions.chapter.shockSuppressor.text.1=The Shock Absorber is a block that, when supplied with RF, it will protect an area of up to blocks around it from any type of Explosion, be it ghasts, TNT or creepers. Every block that is protected will result in a loss of RF. diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletGadgets.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletGadgets.png index cf084f7c7bb6b72bf1e438fd1fcd47a56d30eeb1..0bfed6f38a287004c8c060f1413d39a4d4dcc7df 100644 GIT binary patch literal 5467 zcmd^D`9IX#|370iwvi>-*KUi7kX;O+=t|N?vW3vKZ&@--WJ}1cr0iL`kuCc+)Y!^e zc0-oI*s>00%;5V*_j~W>@%Vnf|G@W$dB4y5oabvjuh;9m&O}_jqQlC}&kO)yy`-ys z4FDK4gaJkb^fGn-%NBak+nv`x4?tlI3+?U!=$pw^_qGQB2eWp6u&|-`F3=={=Oz6M z3?q!f9Lh33i%%~>Q+%Emj6JWr*m`>3b-xE(@7{OzJmY-NQ&jGZ^ck76TJ#R{0B|*2 z(msE~$NcAz#RtJYGX__^w5t&e%oiAiuX5$X6GV= zPIz@?Jos50{j*$V0X|{C^sGKYK#)eM>YHiV%2nM&7A9r4jHJn%A{i^=CaT`}Lf zqMF_M{9=Heo!wOH>ms6m3~A;EH9^+yfh}=kxTd{k*mc;ePv75fCiB%3><_;=Nn@85 zqDoicqssGr#gbSAP8>c;A*NUmD~QRb)u{7D&sT{ZIOV*mg~}Xe;9I!)j03OI1(On$ zCpfU@p8^?=cm`?%1J~?_A1>BBM^o4JA1wY*8>se`g=0jqh~;d$(e`tTiSxr%-gz^N z<%H#H=(wyk+IE&}zFHseA{h`! z5IKwl*|%*Zv5=58ouzlE)(_O?_X0(G&ZuZ-V9~pZhfLAHH@d z`m9AV=fQ<@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