From 943b8d9a83d5e0e8ab5d2190133dc6ec2dad4e0f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 30 Aug 2015 04:02:28 +0200 Subject: [PATCH] Changed some more on the Booklet --- .../actuallyadditions/booklet/GuiBooklet.java | 2 +- .../booklet/InitBooklet.java | 3 +++ .../booklet/page/PageCrafting.java | 5 +++- .../booklet/page/PageCrusherRecipe.java | 5 +++- .../booklet/page/PageFurnace.java | 5 +++- .../booklet/page/PageText.java | 5 +++- .../crafting/BlockCrafting.java | 2 ++ .../assets/actuallyadditions/lang/en_US.lang | 25 ++++++------------- 8 files changed, 29 insertions(+), 23 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java index 840cc5786..5b5d23173 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java @@ -306,7 +306,7 @@ public class GuiBooklet extends GuiScreen{ this.getButton(BUTTON_FORWARD_ID).visible = this.pageOpenInIndex < this.indexPageAmount; this.getButton(BUTTON_BACK_ID).visible = this.pageOpenInIndex > 1; - for(int i = 0; i < 12; i++){ + for(int i = 0; i < BUTTONS_PER_PAGE; i++){ GuiButton button = this.getButton(CHAPTER_BUTTONS_START+i); if(entry == null){ boolean entryExists = InitBooklet.entries.size() > i+(BUTTONS_PER_PAGE*this.pageOpenInIndex-BUTTONS_PER_PAGE); diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java index 9fa3b1557..81f7a67a8 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java @@ -29,6 +29,7 @@ public class InitBooklet{ public static ArrayList pagesWithItemStackData = new ArrayList(); public static BookletIndexEntry entryFunctionalNonRF = new BookletIndexEntry("functionalNoRF"); + public static BookletIndexEntry entryFunctionalRF = new BookletIndexEntry("functionalRF"); public static BookletIndexEntry entryMisc = new BookletIndexEntry("misc"); public static BookletIndexEntry allAndSearch = new BookletEntryAllSearch("allAndSearch"); @@ -38,6 +39,8 @@ public class InitBooklet{ new BookletChapter("phantomBreaker", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomPlacer), new PageCrafting(3, BlockCrafting.recipePhantomBreaker)); new BookletChapter("esd", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipeESD), new PageCrafting(3, BlockCrafting.recipeAdvancedESD)); + new BookletChapter("coffeeMachine", entryFunctionalRF, new PageText(1), new PageText(2), new PageText(3), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine)); + new BookletChapter("craftingIngs", entryMisc, new PageText(1), new PageCrafting(2, ItemCrafting.recipeCoil), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced), new PageCrafting(4, BlockCrafting.recipeCase), new PageCrafting(5, BlockCrafting.recipeStoneCase), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock), new PageCrafting(7, BlockCrafting.recipeEnderCase)); new BookletChapter("cloud", entryMisc, new PageText(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud)); new BookletChapter("foods", entryMisc, new PageCrafting(1, FoodCrafting.recipePizza), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())), new PageCrafting(3, FoodCrafting.recipeHamburger), new PageCrafting(4, FoodCrafting.recipeBigCookie), new PageCrafting(5, FoodCrafting.recipeSubSandwich), new PageCrafting(6, FoodCrafting.recipeFrenchFry), new PageCrafting(7, FoodCrafting.recipeFrenchFries), new PageCrafting(8, FoodCrafting.recipeFishNChips), new PageCrafting(9, FoodCrafting.recipeCheese), new PageCrafting(10, FoodCrafting.recipePumpkinStew), new PageCrafting(11, FoodCrafting.recipeCarrotJuice), new PageCrafting(12, FoodCrafting.recipeSpaghetti), new PageCrafting(13, FoodCrafting.recipeNoodle), new PageCrafting(14, FoodCrafting.recipeChocolate), new PageCrafting(15, FoodCrafting.recipeChocolateCake), new PageCrafting(16, FoodCrafting.recipeToast), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()))); diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java index e2f4f52f7..151279041 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java @@ -57,7 +57,10 @@ public class PageCrafting extends BookletPage{ gui.unicodeRenderer.drawSplitString(StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0); } - gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+100, 115, 0); + String text = gui.currentPage.getText(); + if(text != null && !text.isEmpty() && !text.contains("booklet.")){ + gui.unicodeRenderer.drawSplitString(text.replace("", "\n"), gui.guiLeft+14, gui.guiTop+100, 115, 0); + } if(this.recipe != null){ diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java index f9ec22fa2..5abd21a6d 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java @@ -50,7 +50,10 @@ public class PageCrusherRecipe extends BookletPage{ gui.unicodeRenderer.drawSplitString(StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0); } - gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+112, 115, 0); + String text = gui.currentPage.getText(); + if(text != null && !text.isEmpty() && !text.contains("booklet.")){ + gui.unicodeRenderer.drawSplitString(text.replace("", "\n"), gui.guiLeft+14, gui.guiTop+100, 115, 0); + } int secondChance = CrusherRecipeManualRegistry.getSecondChance(this.input); if(secondChance > 0){ diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java index dd5fe7f43..b63bbc360 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java @@ -52,7 +52,10 @@ public class PageFurnace extends BookletPage{ gui.unicodeRenderer.drawSplitString(StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0); } - gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+112, 115, 0); + String text = gui.currentPage.getText(); + if(text != null && !text.isEmpty() && !text.contains("booklet.")){ + gui.unicodeRenderer.drawSplitString(text.replace("", "\n"), gui.guiLeft+14, gui.guiTop+100, 115, 0); + } if(input != null){ for(int i = 0; i < 2; i++){ diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java index ff10121ea..dc9f5ef5c 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java @@ -20,6 +20,9 @@ public class PageText extends BookletPage{ @Override public void render(GuiBooklet gui, int mouseX, int mouseY){ - gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+11, 115, 0); + String text = gui.currentPage.getText(); + if(text != null && !text.isEmpty() && !text.contains("booklet.")){ + gui.unicodeRenderer.drawSplitString(text.replace("", "\n"), gui.guiLeft+14, gui.guiTop+11, 115, 0); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java index b1d439bba..c729f8ff0 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java @@ -45,6 +45,7 @@ public class BlockCrafting{ public static IRecipe recipeESD; public static IRecipe recipeAdvancedESD; public static IRecipe recipePhantomBooster; + public static IRecipe recipeCoffeeMachine; public static void init(){ @@ -118,6 +119,7 @@ public class BlockCrafting{ 'C', InitItems.itemCoffeeBean, 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()))); + recipeCoffeeMachine = Util.lastIRecipe(); } //Energizer diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 6e8a267b8..75ddb2b28 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -367,27 +367,11 @@ item.actuallyadditions.itemBooklet.name=Actually Additions Information Manual booklet.actuallyadditions.indexEntry.misc.name=Miscellaneous booklet.actuallyadditions.indexEntry.functionalNoRF.name=Functional Blocks (No RF use) booklet.actuallyadditions.indexEntry.allAndSearch.name=All Items and Search +booklet.actuallyadditions.indexEntry.functionalRF.name=Functional Blocks (Use RF) booklet.actuallyadditions.recipeDisabled=The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe! booklet.actuallyadditions.chapter.foods.name=Food -booklet.actuallyadditions.chapter.foods.text.1=A Pizza is round, delicious and tastes of tomatoes, cheese and deliciousness. Yum! -booklet.actuallyadditions.chapter.foods.text.2=Rice Bread is made in a furnace from rice dough, which can be made from rice. It tastes of a combination of rice and bread. Because that's what it is, I guess. -booklet.actuallyadditions.chapter.foods.text.3=It's two slices of bread with a piece of meat, cheese and some salad between it. Could have originated in Hamburg, Germany. -booklet.actuallyadditions.chapter.foods.text.4=It's like a normal cookie, but more chocolate-y and bigger. -booklet.actuallyadditions.chapter.foods.text.5=It's a baguette cut open, containing cheese, salad, fish and some other goodies, wrapped in paper. -booklet.actuallyadditions.chapter.foods.text.6=Some people call it "French Stick". We just call it "Baguette". -booklet.actuallyadditions.chapter.foods.text.7=Or chips, if you're not american! -booklet.actuallyadditions.chapter.foods.text.8=It's a paper container filled with fries and fish. What more could you want? -booklet.actuallyadditions.chapter.foods.text.9=Someone might really like this. -booklet.actuallyadditions.chapter.foods.text.10=I somehow have a weird song stuck in my head where someone just repeatedly goes "Pumpkin pumpkin pumpkin blur, pumpkin blur, pumpkin blur"... -booklet.actuallyadditions.chapter.foods.text.11=It's like Tomato Juice, only that you don't always get it on a plane. -booklet.actuallyadditions.chapter.foods.text.12=It's a bowl with 3 noodles in it. It must be a really big bowl, I guess. -booklet.actuallyadditions.chapter.foods.text.13=It's just a paper container filled with noodles. Like you get in your local supermarket. If you have one local. -booklet.actuallyadditions.chapter.foods.text.14=Lari likes. -booklet.actuallyadditions.chapter.foods.text.15=It's chocolate cake. Who wouldn't like it!? -booklet.actuallyadditions.chapter.foods.text.16=It's Toast. What more could I say? -booklet.actuallyadditions.chapter.foods.text.17=Dough gets cooked into Baguette in a Furnace and can then join the french fries on their mission to achieve something or another. booklet.actuallyadditions.chapter.cloud.name=Smiley Cloud booklet.actuallyadditions.chapter.cloud.text.1=A Smiley Cloud is a neat little block that you can put down in the world. When in place, it will hover around across the ground, though staying on the block you placed it in. When right-clicking the cloud, it will open a GUI that enables you to change its name, and thus, its appearance if you do it right. On the next page, you can find some examples you can try out. @@ -424,4 +408,9 @@ booklet.actuallyadditions.chapter.craftingIngs.text.7=The Ender Casing booklet.actuallyadditions.chapter.esd.name=ESDs booklet.actuallyadditions.chapter.esd.text.1=The ESD is a block that basically works like an extremely advanced hopper. You can configure the sides and the exact range of slots to put into and pull from. When hovering over the parts of the ESD's GUI, you can see more in-depth info about it. booklet.actuallyadditions.chapter.esd.text.2=The normal ESD doesn't have a specific item filter. It'll just pull and put everything it finds. -booklet.actuallyadditions.chapter.esd.text.3=The Advanced ESD has a filter, so that you can specify what to pull and put. \ No newline at end of file +booklet.actuallyadditions.chapter.esd.text.3=The Advanced ESD has a filter, so that you can specify what to pull and put. + +booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine +booklet.actuallyadditions.chapter.coffeeMachine.text.1=The Coffee Machine is a very powerful block that is basically a extended brewing stand. After adding Coffee Beans, a Cup and some RF and Water, you can add up to 8 different Items to the extra slots to give your coffee potion effects of your choosing. When you have added all of the items for the effects you want, just press the OK-button or give the machine a redstone signal. +booklet.actuallyadditions.chapter.coffeeMachine.text.2=Sugar > Speed 30s Magma Cream > Fire Resistance 20s Pufferfish > Water Breathing 10s Golden Carrot > Night Vision 30s Ghast Tear > Regeneration 5s Blaze Powder > Strength 15s Fermented Spider Eye > Invisibility 25s +booklet.actuallyadditions.chapter.coffeeMachine.text.3=Every effect has a default amount of time it lasts for and a maximum amount that can be put into a coffee. The default amplifier of the effects is always I. A bucket of milk (or a glass of soy milk if you have HarvestCraft installed!) causes all previously added effects (meaning all items added in slots with smaller numbers!) to last 2 Minutes longer, but lose one amplifier level, meaning that you always have to add two of one item before you add a bucket of milk. \ No newline at end of file