mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Recipe/docs and inv render for the Cocoon of Caprice.
This commit is contained in:
1 parent
1762e9b04e
commit
19f80d1a34
7 files changed
+87
-2
No files matched your search
@@ -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);
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user