// Path: java/tb/common/item/ItemNodeFoci.java
// public class ItemNodeFoci extends Item{
// 
// 	public static final String names[] = new String[]{
// 		"brightness",
// 		"destruction",
// 		"efficiency",
// 		"hunger",
// 		"instability",
// 		"purity",
// 		"sinister",
// 		"speed",
// 		"stability",
// 		"taint"
// 	};
// 	
// 	public ItemNodeFoci()
// 	{
// 		super();
// 		this.setHasSubtypes(true);
// 		this.setMaxDamage(0);
// 		this.setMaxStackSize(1);
// 	}
// 	
//     public int getMetadata(int meta)
//     {
//     	return meta;
//     }
//     
//     public String getUnlocalizedName(ItemStack is)
//     {
//     	return super.getUnlocalizedName(is)+names[is.getItemDamage()].replace('/', '.');
//     }
//     
//     @SuppressWarnings({ "rawtypes", "unchecked" })
// 	@SideOnly(Side.CLIENT)
//     public void getSubItems(Item itm, CreativeTabs tab, List lst)
//     {
//     	for(int i = 0; i < names.length; ++i)
//     		lst.add(new ItemStack(itm,1,i));
//     }
// }


import DummyCore.Client.AdvancedModelLoader;
import DummyCore.Client.IModelCustom;
import DummyCore.Utils.BlockStateMetadata;
import DummyCore.Utils.DrawUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import tb.common.item.ItemNodeFoci;
package tb.client.render.tile;


@SuppressWarnings("rawtypes")
public class RenderNodeManipulator extends TileEntitySpecialRenderer{
	public static final IModelCustom model = AdvancedModelLoader.loadModel(new ResourceLocation("thaumicbases","models/nodeManipulator/nodeManipulator.obj"));
	public static final ResourceLocation genIcon = new ResourceLocation("thaumicbases","textures/blocks/nodeManipulator/baseUVMap.png");
	
	@Override
	public void renderTileEntityAt(TileEntity tile, double screenX,	double screenY, double screenZ, float partialTicks, int i)
	{
		GlStateManager.pushMatrix();
		GlStateManager.translate(screenX+0.5D, screenY, screenZ+0.5D);
		GlStateManager.scale(0.5D, 0.5D, 0.5D);
		
		Minecraft.getMinecraft().renderEngine.bindTexture(genIcon);
		model.renderPart("base_Cube.001");
		model.renderPart("handle_0_Cube.002");
		model.renderPart("handle_1_Cube.002");
		model.renderPart("handle_2_Cube.002");
		model.renderPart("handle_3_Cube.002");
		
		int meta = BlockStateMetadata.getBlockMetadata(tile.getWorld(), tile.getPos());
		if(meta != 0)
		{
// Path: java/tb/common/item/ItemNodeFoci.java
// public class ItemNodeFoci extends Item{
// 
// 	public static final String names[] = new String[]{
// 		"brightness",
// 		"destruction",
// 		"efficiency",
// 		"hunger",
// 		"instability",
// 		"purity",
// 		"sinister",
// 		"speed",
// 		"stability",
// 		"taint"
// 	};
// 	
// 	public ItemNodeFoci()
// 	{
// 		super();
// 		this.setHasSubtypes(true);
// 		this.setMaxDamage(0);
// 		this.setMaxStackSize(1);
// 	}
// 	
//     public int getMetadata(int meta)
//     {
//     	return meta;
//     }
//     
//     public String getUnlocalizedName(ItemStack is)
//     {
//     	return super.getUnlocalizedName(is)+names[is.getItemDamage()].replace('/', '.');
//     }
//     
//     @SuppressWarnings({ "rawtypes", "unchecked" })
// 	@SideOnly(Side.CLIENT)
//     public void getSubItems(Item itm, CreativeTabs tab, List lst)
//     {
//     	for(int i = 0; i < names.length; ++i)
//     		lst.add(new ItemStack(itm,1,i));
//     }
// }


// Path: java/tb/client/render/tile/RenderNodeManipulator.java
import DummyCore.Client.AdvancedModelLoader;
import DummyCore.Client.IModelCustom;
import DummyCore.Utils.BlockStateMetadata;
import DummyCore.Utils.DrawUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import tb.common.item.ItemNodeFoci;

package tb.client.render.tile;


@SuppressWarnings("rawtypes")
public class RenderNodeManipulator extends TileEntitySpecialRenderer{
	public static final IModelCustom model = AdvancedModelLoader.loadModel(new ResourceLocation("thaumicbases","models/nodeManipulator/nodeManipulator.obj"));
	public static final ResourceLocation genIcon = new ResourceLocation("thaumicbases","textures/blocks/nodeManipulator/baseUVMap.png");
	
	@Override
	public void renderTileEntityAt(TileEntity tile, double screenX,	double screenY, double screenZ, float partialTicks, int i)
	{
		GlStateManager.pushMatrix();
		GlStateManager.translate(screenX+0.5D, screenY, screenZ+0.5D);
		GlStateManager.scale(0.5D, 0.5D, 0.5D);
		
		Minecraft.getMinecraft().renderEngine.bindTexture(genIcon);
		model.renderPart("base_Cube.001");
		model.renderPart("handle_0_Cube.002");
		model.renderPart("handle_1_Cube.002");
		model.renderPart("handle_2_Cube.002");
		model.renderPart("handle_3_Cube.002");
		
		int meta = BlockStateMetadata.getBlockMetadata(tile.getWorld(), tile.getPos());
		if(meta != 0)
		{
			DrawUtils.bindTexture("thaumicbases", "textures/blocks/nodeManipulator/foci_"+ItemNodeFoci.names[meta-1]+".png");