From b1511de6d39c3861e10e788f9a75f6bf8db4dfb8 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Mon, 28 Sep 2015 22:08:42 +0100 Subject: [PATCH] Recipe/docs for the Corporea Retainer and the new Crystal Cube stuff. Also a recipe counter for fun. --- .../block/corporea/BlockCorporeaRetainer.java | 10 +++++++++- .../common/crafting/ModCraftingRecipes.java | 15 ++++++++++++++- .../botania/common/lexicon/LexiconData.java | 6 +++++- .../vazkii/botania/common/lib/LibLexicon.java | 1 + src/main/resources/assets/botania/lang/en_US.lang | 8 ++++++++ 5 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/main/java/vazkii/botania/common/block/corporea/BlockCorporeaRetainer.java b/src/main/java/vazkii/botania/common/block/corporea/BlockCorporeaRetainer.java index 519b1cbc4..a9232c089 100644 --- a/src/main/java/vazkii/botania/common/block/corporea/BlockCorporeaRetainer.java +++ b/src/main/java/vazkii/botania/common/block/corporea/BlockCorporeaRetainer.java @@ -18,13 +18,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.common.achievement.ICraftAchievement; import vazkii.botania.common.achievement.ModAchievements; import vazkii.botania.common.block.BlockModContainer; import vazkii.botania.common.block.tile.corporea.TileCorporeaRetainer; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockNames; -public class BlockCorporeaRetainer extends BlockModContainer implements ICraftAchievement { +public class BlockCorporeaRetainer extends BlockModContainer implements ILexiconable, ICraftAchievement { public BlockCorporeaRetainer() { super(Material.iron); @@ -66,4 +69,9 @@ public class BlockCorporeaRetainer extends BlockModContainer implements ICraftAc return ModAchievements.corporeaCraft; } + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return LexiconData.corporeaRetainer; + } + } diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index 765450f57..db7d920c7 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -14,6 +14,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.apache.logging.log4j.Level; + import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -35,6 +37,7 @@ import vazkii.botania.common.item.ItemSignalFlare; import vazkii.botania.common.item.ItemTwigWand; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.lib.LibOreDict; +import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.registry.GameRegistry; public final class ModCraftingRecipes { @@ -293,6 +296,7 @@ public final class ModCraftingRecipes { public static IRecipe recipeAutocraftingHalo; public static List recipesPavement; public static IRecipe recipeCellBlock; + public static IRecipe recipeCorporeaRetainer; // Garden of Glass public static IRecipe recipeRootToSapling; @@ -303,6 +307,8 @@ public final class ModCraftingRecipes { public static IRecipe recipeEndPortal; public static void init() { + int recipeListSize = CraftingManager.getInstance().getRecipeList().size(); + // Lexicon Recipe addShapelessOreDictRecipe(new ItemStack(ModItems.lexicon), "treeSapling", Items.book); recipeLexicon = BotaniaAPI.getLatestAddedRecipe(); @@ -1623,7 +1629,7 @@ public final class ModCraftingRecipes { addShapelessOreDictRecipe(new ItemStack(ModBlocks.corporeaFunnel), new ItemStack(Blocks.dropper), new ItemStack(ModItems.corporeaSpark)); recipeCorporeaFunnel = BotaniaAPI.getLatestAddedRecipe(); - // Corporea Funnel Recipe + // Corporea Interceptor Recipe addShapelessOreDictRecipe(new ItemStack(ModBlocks.corporeaInterceptor), "blockRedstone", new ItemStack(ModItems.corporeaSpark)); recipeCorporeaInterceptor = BotaniaAPI.getLatestAddedRecipe(); @@ -1996,6 +2002,10 @@ public final class ModCraftingRecipes { GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.cellBlock, 3), new ItemStack(Blocks.cactus), new ItemStack(Blocks.cactus), new ItemStack(Blocks.cactus), new ItemStack(Blocks.cactus), new ItemStack(Items.carrot), new ItemStack(Items.potato)); recipeCellBlock = BotaniaAPI.getLatestAddedRecipe(); + // Corporea Retainer Recipe + addShapelessOreDictRecipe(new ItemStack(ModBlocks.corporeaRetainer), new ItemStack(Blocks.chest), new ItemStack(ModItems.corporeaSpark)); + recipeCorporeaRetainer = BotaniaAPI.getLatestAddedRecipe(); + /////////////////////////////////////////////////////////////////////////////////////////////////////////// // Storage Block/Nugget Recipes @@ -2097,6 +2107,9 @@ public final class ModCraftingRecipes { if(Botania.gardenOfGlassLoaded) initGardenOfGlass(); + + int newRecipeListSize = CraftingManager.getInstance().getRecipeList().size(); + FMLLog.log(Level.INFO, "[Botania] Registered %d recipes.", newRecipeListSize - recipeListSize); } private static void initGardenOfGlass() { diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index fe0c2d39e..5ce8e6ecc 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -224,6 +224,7 @@ public final class LexiconData { public static LexiconEntry luminizerTransport; public static LexiconEntry starSword; public static LexiconEntry thunderSword; + public static LexiconEntry corporeaRetainer; public static LexiconEntry baublesIntro; public static LexiconEntry cosmeticBaubles; @@ -847,7 +848,7 @@ public final class LexiconData { blackHoleTalisman.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeBlackHoleTalisman)); corporeaCrystalCube = new ALexiconEntry(LibLexicon.ENDER_CORPOREA_CRYSTAL_CUBE, categoryEnder); - corporeaCrystalCube.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeCorporeaCrystalCube)); + corporeaCrystalCube.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("3"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeCorporeaCrystalCube)); luminizerTransport = new ALexiconEntry(LibLexicon.ENDER_LUMINIZER_TRANSPORT, categoryEnder); luminizerTransport.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeLuminizer), new PageText("3"), new PageCraftingRecipe("4", ModCraftingRecipes.recipeDetectorLuminizer), new PageText("5"), new PageCraftingRecipe("6", ModCraftingRecipes.recipeLuminizerLauncher)); @@ -858,6 +859,9 @@ public final class LexiconData { thunderSword = new ALexiconEntry(LibLexicon.ENDER_THUNDER_SWORD, categoryEnder); thunderSword.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeThunderSword)); + corporeaRetainer = new ALexiconEntry(LibLexicon.ENDER_CORPOREA_RETAINER, categoryEnder); + corporeaRetainer.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeCorporeaRetainer)); + // BAUBLES ENTRIES baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles); baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2")); diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index 4247e3c6e..794eb1502 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -192,6 +192,7 @@ public final class LibLexicon { public static final String ENDER_LUMINIZER_TRANSPORT = "luminizerTransport"; public static final String ENDER_STAR_SWORD = "starSword"; public static final String ENDER_THUNDER_SWORD = "thunderSword"; + public static final String ENDER_CORPOREA_RETAINER = "corporeaRetainer"; public static final String BAUBLE_INTRO = "bIntro"; public static final String BAUBLE_COSMETIC = "cosmeticBaubles"; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 3f9328c69..c140331ff 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -3013,8 +3013,16 @@ botania.page.corporeaInterceptor2=So many automation prospects botania.entry.corporeaCrystalCube=Corporea Crystal Cube botania.page.corporeaCrystalCube0=A seer usually looks through a crystal ball to see the future. Well, a corporea handler would look through a crystal cube to see the present. The &1Corporea Crystal Cube&0 acts as a visual medium to interact ith one's &4Corporea Network&0. Placing the block down and giving it a &1Corporea Spark&0 is the obvious first step to hooking it up to the network. botania.page.corporeaCrystalCube1=When the block is connected, right clicking it with any sort of item will have it monitor that item, allowing someone who's looking at it see how many exist in the network. The display updates about once every second.
While there's an item selected, left clicking the block will request one of that item from the network. Shift-left clicking requests a whole stack. +botania.page.corporeaCrystalCube3=The &1Corporea Crystal Cube&0 can be used alongside a &1Redstone Comparator&0. This will output the amount of items of the type it's looking for in the system. The output value follows a logaritmic progression, or on layman's terms, every level requires twice as many of the item as the previous one, starting at 1. 0 items would be signal 0. 1 item for 1, 2 items for 2, 4 items for 3, 8 items for 4, 16 items for 5 and so on up to 15. botania.page.corporeaCrystalCube2=I can see forever +# -- CORPOREA RETAINER +botania.entry.corporeaRetainer=Corporea Retainer +botania.page.corporeaRetainer0=The &1Corporea Retainer&0 is an addon of sorts to the &1Corporea Interceptor&0. Placing one of these adjacent to an interceptor allows for the interceptor to pass along to it the original corporea request, if it's intercepted.
When this happens, the retainer remembers which corporea object in the network initiated the request as well as the contents of said request. +botania.page.corporeaRetainer1=Once the &1Corporea Retainer&0 receives a redstone signal after it's been informed of a request, it'll have the original requestor redo the exact same request. For example, a funnel might request &1Wooden Planks&0 from the network. An interceptor intercepts the request and passes a signal along to craft the planks. The retainer then gets a signal, allowing for the original funnel to redo the request and get its planks. +botania.page.corporeaRetainer2=As the &1Corporea Retainer&0 acts as an addon to the interceptor, it can use it to interact with the network, thus not needing a spark itself.
The retainer can only hold on to one request at a time, and will not accept another until the last one is fulfiled. A &1Redstone Comparator&0 can read if there's a request to be done or not. +botania.page.corporeaRetainer3=The nemesis of a goldfish + # -- DECORATIVE END BLOCKS botania.entry.endStoneDecor=Decorative End Blocks botania.page.endStoneDecor0=Similarly to other stone blocks, &1End Stone&0 can be converted into bricks and chiseled bricks, the bricks can be used as stairs or slabs just like normal &1Stone Bricks&0 would.
&1Ender Pearls&0 can be combined with the bricks to create &1Ender Brick&0 blocks, which can also can be used for stairs or slabs.