Localized more of the book yet again, fixed a crash with loading the last book page

This commit is contained in:
Ellpeck 2015-09-19 15:52:04 +02:00
parent 69eda3f21d
commit 018c6282ae
5 changed files with 45 additions and 14 deletions

View file

@ -29,7 +29,7 @@ public class BookletChapterCrusher extends BookletChapter{
ArrayList<BookletPage> list = new ArrayList<BookletPage>();
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()]);
}

View file

@ -30,7 +30,7 @@ public class BookletChapterFurnace extends BookletChapter{
ArrayList<BookletPage> list = new ArrayList<BookletPage>();
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()]);
}

View file

@ -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("<rf>", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("<coffee>", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("<water>", 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("<rf1>", ConfigIntValues.GRINDER_ENERGY_USED.getValue()).addTextReplacement("<rf2>", 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("<rf>", ConfigIntValues.FURNACE_ENERGY_USED.getValue()));
new BookletChapter("miner", entryFunctionalRF, new ItemStack(InitBlocks.blockOreMagnet), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue()).addTextReplacement("<oil>", ConfigIntValues.ORE_MAGNET_OIL_USE.getValue()).addTextReplacement("<range>", 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("<rf>", 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("<rf>", 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("<rf>", ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue()));
new BookletChapter("solarPanel", entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue()), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
new BookletChapter("heatCollector", entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue()).addTextReplacement("<min>", 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("<pressRF>", ConfigIntValues.PRESS_ENERGY_USED.getValue()).addTextReplacement("<canola>", ConfigIntValues.PRESS_MB_PRODUCED.getValue()).addTextReplacement("<rf>", 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));

View file

@ -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);

View file

@ -471,4 +471,35 @@ booklet.actuallyadditions.chapter.crate.text.1=<item>Storage Crates<r> are big.
booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine
booklet.actuallyadditions.chapter.coffeeMachine.text.1=The <item>Coffee Machine<r> basically works like a Brewing Stand, only 20 times more customizable. <n>After inserting an <item>Empty Cup<r>, <coffee> <item>Coffee<r>, which can be <imp>found in the wild, planted and harvested<r>, and <water>mB of <imp>Water<r> and <imp><rf> RF/t<r>, it will be able to brew some coffee for you! <n>This is where the customizable bit comes in, though: You can <imp>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<r>!
booklet.actuallyadditions.chapter.coffeeMachine.text.2=Every ingredient has a <imp>base time<r> and a <imp>maximum amount<r> of which it can be inputted into the machine. <n>Here are the ingredients: <n><n>Sugar -> Speed 30s, 4max <n>Magma Cream -> 20s, 1max <n>Pufferfish -> Water Breathing, 10s, 1max <n>Golden Carrot -> Night Vision, 30s, 1max <n>Ghast Tear -> Regeneration, 5s, 3max <n>Blaze Powder -> Strength, 15s, 4max <n>Fermented Spider Eye -> Invisibility, 25s, 1max
booklet.actuallyadditions.chapter.coffeeMachine.text.3=There is one special item, however, that is very powerful for the <item>Coffee Machine<r>: <n>The <item>Milk Bucket<r>. <n>This item is especially powerful, because it <imp>doubles the time of an effect<r> while <imp>taking one amplifier away<r>. But be careful: If you only have an amplifier of 1 on an effect, it'll be removed! <n>To amplify the effect of a certain item, just <imp>put it into multiple slots<r> causing the amplifier of it to rise. <n>When you're ready, just press the button to brew your coffee!
booklet.actuallyadditions.chapter.coffeeMachine.text.3=There is one special item, however, that is very powerful for the <item>Coffee Machine<r>: <n>The <item>Milk Bucket<r>. <n>This item is especially powerful, because it <imp>doubles the time of an effect<r> while <imp>taking one amplifier away<r>. But be careful: If you only have an amplifier of 1 on an effect, it'll be removed! <n>To amplify the effect of a certain item, just <imp>put it into multiple slots<r> causing the amplifier of it to rise. <n>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 <item>Crusher<r> turns every ore, ingot and gem into its corresponding <imp>dust<r> using <rf1> RF/t. <n>When you put in <imp>Ores<r> however, they will yield <imp>2 pieces of dust<r>. <n>The <item>Double Crusher<r> basically does the same, however it can crush two ores at a time and uses <rf2> RF/t. <n>On the following pages, you can see <imp>all of the recipes<r>. <n><n><i>He's my crush
booklet.actuallyadditions.chapter.furnaceDouble.name=Double Furnace
booklet.actuallyadditions.chapter.furnaceDouble.text.1=The <item>Double Furnace<r> works like a furnace, however, it uses <rf> RF/t and can smelt <imp>two items at a time<r>. <n>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 <item>Magnetic Miner<r> pulls ore blocks out of the ground using <rf> RF/t and <oil> of Oil/block mined. <n>Every place where an ore should be pulled up must have a <item>Casing Block<r> one block lower than the miner. <n>It has a range of <range> blocks.
booklet.actuallyadditions.chapter.lavaFactory.name=Lava Factory
booklet.actuallyadditions.chapter.lavaFactory.text.1=The <item>Lava Factory<r> can produce blocks of lava given <imp><rf> RF/block<r>. <n>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. <n>Right-Clicking on the <item>Lava Factory<r> will show you if it's able to produce Lava in its current setup. <n><n><i>Lava, for a fact. <n> ory
booklet.actuallyadditions.chapter.energizer.name=Energizer and Enervator
booklet.actuallyadditions.chapter.energizer.text.1=The <item>Energizer<r> <imp>charges items that hold RF<r> using its energy supply.
booklet.actuallyadditions.chapter.energizer.text.2=The <item>Enervator<r> <imp>discharges items that hold RF<r> and stores the energy in its energy supply.
booklet.actuallyadditions.chapter.repairer.name=Item Repairer
booklet.actuallyadditions.chapter.repairer.text.1=The <item>Item Repairer<r> uses <imp><rf> RF/t<r> to repair items that can be repaired in an Anvil <imp>without needing any materials<r>!
booklet.actuallyadditions.chapter.coalGen.name=Coal Generator
booklet.actuallyadditions.chapter.coalGen.text.1=The <item>Coal Generator<r> generates <imp><rf> RF/t<r> through the use of everything that can be put into a furnace. <n>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 <item>Solar Panel<r> <imp>produces <rf> RF/t<r> when it has direct daylight above it and it is daytime. <n><n><i>Panelled walls
booklet.actuallyadditions.chapter.heatCollector.name=Heat Collector
booklet.actuallyadditions.chapter.heatCollector.text.1=The <item>Heat Collector<r> is a block that <imp>produces <rf> RF/t<r>. <n>To do that, it needs to be <imp>surrounded with at least <min> Lava Blocks<r> directly around it on any side except the top one. But watch out, it sometimes <imp>destroys some of these Lava Blocks<r>!
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 <imp>Canola Oil<r>, <imp>Oil<r> and produce <imp>RF<r> from it. <n>The way to do that is to take some <item>Canola, put it into a <item>Canola Press<r> which uses <pressRF> RF/t. That creates <imp><canola> mB of Canola Oil<r>. Put that into a <item>Fermenting Barrel<r>, let it sit there for a while before it converts into <imp>Oil<r>. That oil can then be used in a <item>Oil Generator<r> to create <imp><rf> RF/t<r>.