diff --git a/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java b/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java index 0d7ef099b..d59346592 100644 --- a/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java +++ b/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java @@ -61,6 +61,7 @@ import vazkii.botania.client.integration.nei.NEIGuiHooks; import vazkii.botania.client.lib.LibRenderIDs; import vazkii.botania.client.render.block.RenderAltar; import vazkii.botania.client.render.block.RenderBrewery; +import vazkii.botania.client.render.block.RenderCocoon; import vazkii.botania.client.render.block.RenderCorporeaCrystalCube; import vazkii.botania.client.render.block.RenderCorporeaIndex; import vazkii.botania.client.render.block.RenderDoubleFlower; @@ -245,6 +246,7 @@ public class ClientProxy extends CommonProxy { RenderingRegistry.registerBlockHandler(new RenderCorporeaCrystalCube()); RenderingRegistry.registerBlockHandler(new RenderIncensePlate()); RenderingRegistry.registerBlockHandler(new RenderHourglass()); + RenderingRegistry.registerBlockHandler(new RenderCocoon()); IMultiblockRenderHook.renderHooks.put(ModBlocks.flower, specialFlowerRender); IMultiblockRenderHook.renderHooks.put(ModBlocks.shinyFlower, specialFlowerRender); diff --git a/src/main/java/vazkii/botania/client/render/block/RenderCocoon.java b/src/main/java/vazkii/botania/client/render/block/RenderCocoon.java new file mode 100644 index 000000000..ca35d002d --- /dev/null +++ b/src/main/java/vazkii/botania/client/render/block/RenderCocoon.java @@ -0,0 +1,49 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under the + * Botania License: http://botaniamod.net/license.php + * + * File Created @ [Jul 8, 2015, 5:57:29 PM (GMT)] + */ +package vazkii.botania.client.render.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import vazkii.botania.client.lib.LibRenderIDs; +import vazkii.botania.common.block.tile.TileCocoon; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RenderCocoon implements ISimpleBlockRenderingHandler { + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { + GL11.glPushMatrix(); + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileCocoon(), 0.0D, 0.0D, 0.0D, 0.0F); + GL11.glPopMatrix(); + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return false; + } + + @Override + public int getRenderId() { + return LibRenderIDs.idCocoon; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + +} diff --git a/src/main/java/vazkii/botania/common/block/BlockCocoon.java b/src/main/java/vazkii/botania/common/block/BlockCocoon.java index 432c0b8bd..f2d031715 100644 --- a/src/main/java/vazkii/botania/common/block/BlockCocoon.java +++ b/src/main/java/vazkii/botania/common/block/BlockCocoon.java @@ -13,18 +13,22 @@ package vazkii.botania.common.block; import java.util.ArrayList; import java.util.Random; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.client.lib.LibRenderIDs; import vazkii.botania.common.block.tile.TileCocoon; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockNames; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -public class BlockCocoon extends BlockModContainer { +public class BlockCocoon extends BlockModContainer implements ILexiconable { protected BlockCocoon() { super(Material.cloth); @@ -77,4 +81,9 @@ public class BlockCocoon extends BlockModContainer { return new TileCocoon(); } + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return LexiconData.cocoon; + } + } diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index 7fe7348fb..6ca140809 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -266,6 +266,7 @@ public final class ModCraftingRecipes { public static IRecipe recipeGhostRail; public static IRecipe recipeCanopyDrum; public static IRecipe recipeSparkChanger; + public static IRecipe recipeCocoon; // Garden of Glass public static IRecipe recipeRootToSapling; @@ -1794,6 +1795,20 @@ public final class ModCraftingRecipes { 'R', new ItemStack(Items.redstone)); recipeSparkChanger = BotaniaAPI.getLatestAddedRecipe(); + // Cocoon of Caprice Recipe + if(Botania.gardenOfGlassLoaded) + addOreDictRecipe(new ItemStack(ModBlocks.cocoon), + "SSS", "SFS", "SIS", + 'S', new ItemStack(Items.string), + 'F', new ItemStack(ModBlocks.felPumpkin), + 'I', LibOreDict.MANA_STEEL); + else addOreDictRecipe(new ItemStack(ModBlocks.cocoon), + "SSS", "SPS", "SDS", + 'S', new ItemStack(Items.string), + 'P', LibOreDict.PIXIE_DUST, + 'D', LibOreDict.DRAGONSTONE); + recipeCocoon = BotaniaAPI.getLatestAddedRecipe(); + // Storage Block/Nugget Recipes addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0), "III", "III", "III", diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 133024621..eda34c3d0 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -153,6 +153,7 @@ public final class LexiconData { public static LexiconEntry hourglass; public static LexiconEntry ghostRail; public static LexiconEntry canopyDrum; + public static LexiconEntry cocoon; public static LexiconEntry manaBlaster; public static LexiconEntry grassSeeds; @@ -613,6 +614,9 @@ public final class LexiconData { canopyDrum = new BLexiconEntry(LibLexicon.DEVICE_CANOPY_DRUM, categoryDevices); canopyDrum.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeCanopyDrum)); + cocoon = Botania.gardenOfGlassLoaded ? new BLexiconEntry(LibLexicon.DEVICE_COCOON, categoryDevices) : new ALexiconEntry(LibLexicon.DEVICE_COCOON, categoryDevices); + cocoon.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeCocoon)); + // TOOLS ENTRIES manaBlaster = new BLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools); manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeManaBlaster)); diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index bf2754ffa..dbc1a61d4 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -123,6 +123,7 @@ public final class LibLexicon { public static final String DEVICE_HOURGLASS = "hourglass"; public static final String DEVICE_GHOST_RAIL = "ghostRail"; public static final String DEVICE_CANOPY_DRUM = "canopyDrum"; + public static final String DEVICE_COCOON = "cocoon"; public static final String TOOL_MANA_BLASTER = "manaBlaster"; public static final String TOOL_GRASS_SEEDS = "grassSeeds"; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index eeb0bb021..2adc19296 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -1493,7 +1493,7 @@ botania.page.gardenOfGlass2=After spawning in the &1Garden of Glass&0 you'll fin botania.page.gardenOfGlass3=Creating &1Saplings&0 botania.page.gardenOfGlass4=Creating &1Floral Fertilizer&0 botania.page.gardenOfGlass5=Creating &1Cobblestone&0 -botania.page.gardenOfGlass6=Aside from that, some things in Botania are different to fit the Skyblock play: The &1Orechid&0 is easier to make, faster and much cheaper; &1Mana Spreaders&0 don't need gold; the &1Blaze Lamp&0, which can be used to create &1Obsidian&0, uses powder instead of rods; melon or pumpkin seeds may drop from tall grass; floral fertilizer creates more per craft, and &1Sugar Canes&0 and &1Slimeballs&0 can be crafted. +botania.page.gardenOfGlass6=Aside from that, some things in Botania are different to fit the Skyblock play: The &1Orechid&0 is easier to make, faster and much cheaper; The &1Cocoon of Caprice&0 and the &1Mana Spreader&0 have different recipes; the &1Blaze Lamp&0, which can be used to create &1Obsidian&0, uses powder instead of rods; melon or pumpkin seeds may drop from tall grass; floral fertilizer creates more per craft, and &1Sugar Canes&0 and &1Slimeballs&0 can be crafted. botania.page.gardenOfGlass7=Creating &1Sugar Canes&0 botania.page.gardenOfGlass8=Creating &1Slimeballs&0 botania.page.gardenOfGlass9=Lastly, it's possible to infuse a &1Pumpkin&0 with the fel spirits of monster slain, creating a &1Fel Pumpkin&0. This can be placed atop two &1Iron Bars&0, in a similar fashion to a &1Snow Golem&0, to spawn a &1Blaze&0.
&1Blazes&0 spawned with this method drop &1Blaze Powder&0 instead of &1Blaze Rods&0. @@ -2191,6 +2191,11 @@ botania.entry.canopyDrum=Drum of the Canopy botania.page.canopyDrum0=The &1Drum of the Canopy&0 is like the &1Drum of the Wild&0 in that it is the percussion counterpart of the &1Horn of the Canopy&0. It serves the exact same purpose as the handheld horn, but is placed in world.
All the functionality is similar to the &1Drum of the Wild&0 botania.page.canopyDrum1=The Pinking Drum +# -- COCOON OF CAPRICE +botania.entry.cocoon=Cocoon of Caprice +botania.page.cocoon0=A cocoon is usually a symbol of change, of evolution.
Creating a &1Cocoon of Carpice&0 and placing it down will slowly evolve the rudimentary contents inside it into a &1Baby Animal&0. More often than not the animal hatched will be a farm animal, but on rare ocasions, different animals such as &1Wolves&0 or &1Horses&0 may be created. +botania.page.cocoon1=New World, Perfect World + # - MYSTICAL INSTRUMENTS # -- MANA BLASTER botania.entry.manaBlaster=Mana Blaster