diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCrusher.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCrusher.java index 1f35fc931..71e7ccab1 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCrusher.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCrusher.java @@ -29,7 +29,7 @@ public class BookletChapterCrusher extends BookletChapter{ ArrayList list = new ArrayList(); list.addAll(Arrays.asList(pages)); for(CrusherRecipeManualRegistry.CrusherRecipe rec : CrusherRecipeManualRegistry.recipes){ - list.add(new PageCrusherRecipe(list.size()+1, rec)); + list.add(new PageCrusherRecipe(list.size()+1, rec).setNoText()); } return list.toArray(new BookletPage[list.size()]); } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterFurnace.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterFurnace.java index 18e3c3e89..e703a8f29 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterFurnace.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterFurnace.java @@ -30,7 +30,7 @@ public class BookletChapterFurnace extends BookletChapter{ ArrayList list = new ArrayList(); list.addAll(Arrays.asList(pages)); for(Object o : FurnaceRecipes.smelting().getSmeltingList().entrySet()){ - list.add(new PageFurnace(list.size()+1, (ItemStack)((Map.Entry)o).getKey(), (ItemStack)((Map.Entry)o).getValue())); + list.add(new PageFurnace(list.size()+1, (ItemStack)((Map.Entry)o).getKey(), (ItemStack)((Map.Entry)o).getValue()).setNoText()); } return list.toArray(new BookletPage[list.size()]); } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java index cf72e9d10..d96908769 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java @@ -78,18 +78,18 @@ public class InitBooklet{ //RF Using Blocks new BookletChapter("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("", ConfigIntValues.COFFEE_MACHINE_WATER_USED.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PageTextOnly(3), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()); - new BookletChapterCrusher("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeCrusher), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher)); - new BookletChapterFurnace("furnaceDouble", entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace)); - new BookletChapter("miner", entryFunctionalRF, new ItemStack(InitBlocks.blockOreMagnet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeMiner), new PageCrafting(3, BlockCrafting.recipeCasing)); - new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeLavaFactory)); + new BookletChapterCrusher("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.GRINDER_ENERGY_USED.getValue()).addTextReplacement("", ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText()); + new BookletChapterFurnace("furnaceDouble", entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).addTextReplacement("", ConfigIntValues.FURNACE_ENERGY_USED.getValue())); + new BookletChapter("miner", entryFunctionalRF, new ItemStack(InitBlocks.blockOreMagnet), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue()).addTextReplacement("", ConfigIntValues.ORE_MAGNET_OIL_USE.getValue()).addTextReplacement("", ConfigIntValues.ORE_MAGNET_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeMiner).setNoText(), new PageCrafting(3, BlockCrafting.recipeCasing).setNoText()); + new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeLavaFactory).setNoText()); new BookletChapter("energizer", entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator)); - new BookletChapter("repairer", entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeRepairer)); + new BookletChapter("repairer", entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("", ConfigIntValues.REPAIRER_ENERGY_USED.getValue())); //RF Generating Blocks - new BookletChapter("coalGen", entryGeneratingRF, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen)); - new BookletChapter("solarPanel", entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSolar)); - new BookletChapter("heatCollector", entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeHeatCollector)); - new BookletChapter("canola", entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel), new PageTextOnly(1), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())), new PageCrafting(3, BlockCrafting.recipeCanolaPress), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen)); + new BookletChapter("coalGen", entryGeneratingRF, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("", ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue())); + new BookletChapter("solarPanel", entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue()), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText()); + new BookletChapter("heatCollector", entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue()).addTextReplacement("", ConfigIntValues.HEAT_COLLECTOR_BLOCKS.getValue()), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText()); + new BookletChapter("canola", entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())).addTextReplacement("", ConfigIntValues.PRESS_ENERGY_USED.getValue()).addTextReplacement("", ConfigIntValues.PRESS_MB_PRODUCED.getValue()).addTextReplacement("", ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue()), new PageCrafting(2, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(3, BlockCrafting.recipeFermentingBarrel).setNoText(), new PageCrafting(4, BlockCrafting.recipeOilGen).setNoText()); //No RF Using Items new BookletChapter("wings", entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings)); diff --git a/src/main/java/ellpeck/actuallyadditions/util/PersistantVariables.java b/src/main/java/ellpeck/actuallyadditions/util/PersistantVariables.java index 7bed0b5c8..9ac87796e 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/PersistantVariables.java +++ b/src/main/java/ellpeck/actuallyadditions/util/PersistantVariables.java @@ -50,8 +50,8 @@ public class PersistantVariables{ int page = compound.getInteger(getName("Page")); BookletIndexEntry currentIndexEntry = entry == -1 ? null : InitBooklet.entries.get(entry); - BookletChapter currentChapter = chapter == -1 || entry == -1 ? null : currentIndexEntry.chapters.get(chapter); - BookletPage currentPage = chapter == -1 ? null : currentChapter.pages[page-1]; + BookletChapter currentChapter = chapter == -1 || entry == -1 || currentIndexEntry.chapters.size() <= chapter ? null : currentIndexEntry.chapters.get(chapter); + BookletPage currentPage = chapter == -1 || currentChapter == null || currentChapter.pages.length <= page-1 ? null : currentChapter.pages[page-1]; int pageInIndex = compound.getInteger(getName("PageInIndex")); gui.openIndexEntry(currentIndexEntry, pageInIndex, true); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 16c312e71..3f74d8510 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -471,4 +471,35 @@ booklet.actuallyadditions.chapter.crate.text.1=Storage Crates are big. booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine booklet.actuallyadditions.chapter.coffeeMachine.text.1=The Coffee Machine basically works like a Brewing Stand, only 20 times more customizable. After inserting an Empty Cup, Coffee, which can be found in the wild, planted and harvested, and mB of Water and RF/t, it will be able to brew some coffee for you! This is where the customizable bit comes in, though: You can choose what potion effects the coffee should get and how long for by dropping in potion ingredients just the way you want your coffee to be! booklet.actuallyadditions.chapter.coffeeMachine.text.2=Every ingredient has a base time and a maximum amount of which it can be inputted into the machine. Here are the ingredients: Sugar -> Speed 30s, 4max Magma Cream -> 20s, 1max Pufferfish -> Water Breathing, 10s, 1max Golden Carrot -> Night Vision, 30s, 1max Ghast Tear -> Regeneration, 5s, 3max Blaze Powder -> Strength, 15s, 4max Fermented Spider Eye -> Invisibility, 25s, 1max -booklet.actuallyadditions.chapter.coffeeMachine.text.3=There is one special item, however, that is very powerful for the Coffee Machine: The Milk Bucket. This item is especially powerful, because it doubles the time of an effect while taking one amplifier away. But be careful: If you only have an amplifier of 1 on an effect, it'll be removed! To amplify the effect of a certain item, just put it into multiple slots causing the amplifier of it to rise. When you're ready, just press the button to brew your coffee! \ No newline at end of file +booklet.actuallyadditions.chapter.coffeeMachine.text.3=There is one special item, however, that is very powerful for the Coffee Machine: The Milk Bucket. This item is especially powerful, because it doubles the time of an effect while taking one amplifier away. But be careful: If you only have an amplifier of 1 on an effect, it'll be removed! To amplify the effect of a certain item, just put it into multiple slots causing the amplifier of it to rise. When you're ready, just press the button to brew your coffee! + +booklet.actuallyadditions.chapter.crusher.name=Crusher and Double Crusher +booklet.actuallyadditions.chapter.crusher.text.1=The Crusher turns every ore, ingot and gem into its corresponding dust using RF/t. When you put in Ores however, they will yield 2 pieces of dust. The Double Crusher basically does the same, however it can crush two ores at a time and uses RF/t. On the following pages, you can see all of the recipes. He's my crush + +booklet.actuallyadditions.chapter.furnaceDouble.name=Double Furnace +booklet.actuallyadditions.chapter.furnaceDouble.text.1=The Double Furnace works like a furnace, however, it uses RF/t and can smelt two items at a time. On the following pages, you can see all of the recipes. + +booklet.actuallyadditions.chapter.miner.name=Magnetic Miner +booklet.actuallyadditions.chapter.miner.text.1=The Magnetic Miner pulls ore blocks out of the ground using RF/t and of Oil/block mined. Every place where an ore should be pulled up must have a Casing Block one block lower than the miner. It has a range of blocks. + +booklet.actuallyadditions.chapter.lavaFactory.name=Lava Factory +booklet.actuallyadditions.chapter.lavaFactory.text.1=The Lava Factory can produce blocks of lava given RF/block. The Block above it has to be surrounded with 4 Casing Blocks (which can be found on the Magnetic Miner Page!), otherwise it won't be able to produce Lava. Right-Clicking on the Lava Factory will show you if it's able to produce Lava in its current setup. Lava, for a fact. ory + +booklet.actuallyadditions.chapter.energizer.name=Energizer and Enervator +booklet.actuallyadditions.chapter.energizer.text.1=The Energizer charges items that hold RF using its energy supply. +booklet.actuallyadditions.chapter.energizer.text.2=The Enervator discharges items that hold RF and stores the energy in its energy supply. + +booklet.actuallyadditions.chapter.repairer.name=Item Repairer +booklet.actuallyadditions.chapter.repairer.text.1=The Item Repairer uses RF/t to repair items that can be repaired in an Anvil without needing any materials! + +booklet.actuallyadditions.chapter.coalGen.name=Coal Generator +booklet.actuallyadditions.chapter.coalGen.text.1=The Coal Generator generates RF/t through the use of everything that can be put into a furnace. Note that it only starts burning something up if there's enough space for the energy generated. + +booklet.actuallyadditions.chapter.solarPanel.name=Solar Panel +booklet.actuallyadditions.chapter.solarPanel.text.1=The Solar Panel produces RF/t when it has direct daylight above it and it is daytime. Panelled walls + +booklet.actuallyadditions.chapter.heatCollector.name=Heat Collector +booklet.actuallyadditions.chapter.heatCollector.text.1=The Heat Collector is a block that produces RF/t. To do that, it needs to be surrounded with at least Lava Blocks directly around it on any side except the top one. But watch out, it sometimes destroys some of these Lava Blocks! + +booklet.actuallyadditions.chapter.canola.name=Everything Canola +booklet.actuallyadditions.chapter.canola.text.1=There is lots of stuff that can be produced from Canola (which can be found in the wild and then planted and harvested!): You can make Canola Oil, Oil and produce RF from it. The way to do that is to take some Canola, put it into a Canola Press which uses RF/t. That creates mB of Canola Oil. Put that into a Fermenting Barrel, let it sit there for a while before it converts into Oil. That oil can then be used in a Oil Generator to create RF/t. \ No newline at end of file