Java Code Examples for thaumcraft.common.config.ConfigBlocks#blockJar()

The following examples show how to use thaumcraft.common.config.ConfigBlocks#blockJar() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlockExtendedNodeJarRenderer.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
    GL11.glPushMatrix();
    GL11.glEnable(3042);
    GL11.glBlendFunc(770, 771);
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    IIcon i1 = ((BlockJar) ConfigBlocks.blockJar).iconJarTop;
    IIcon i2 = ((BlockJar) ConfigBlocks.blockJar).iconJarSide;
    block.setBlockBounds(W3, 0.0F, W3, W13, W12, W13);
    renderer.setRenderBoundsFromBlock(block);
    drawFaces(renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
    block.setBlockBounds(W5, W12, W5, W11, W14, W11);
    renderer.setRenderBoundsFromBlock(block);
    drawFaces(renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
    GL11.glPopMatrix();
}
 
Example 2
Source File: ItemJarExtendedNodeRenderer.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data) {
    if (item.getItem() == RegisteredItems.itemExtendedNodeJar) {
        if (type == IItemRenderer.ItemRenderType.ENTITY) {
            GL11.glTranslatef(-0.5F, -0.25F, -0.5F);
        } else if ((type == IItemRenderer.ItemRenderType.EQUIPPED) && ((data[1] instanceof EntityPlayer))) {
            GL11.glTranslatef(0.0F, 0.0F, -0.5F);
        }
        TileJarNode tjf = new TileJarNode();
        if (item.hasTagCompound()) {
            AspectList aspects = ((ItemExtendedNodeJar) item.getItem()).getAspects(item);
            if (aspects != null) {
                tjf.setAspects(aspects);
                tjf.setNodeType(((ItemExtendedNodeJar) item.getItem()).getNodeType(item));
                tjf.setNodeModifier(((ItemExtendedNodeJar) item.getItem()).getNodeModifier(item));
            }
        }
        tjf.blockType = ConfigBlocks.blockJar;
        tjf.blockMetadata = 2;
        GL11.glPushMatrix();
        TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileJar(), 0.0D, 0.0D, 0.0D, 0.0F);
        GL11.glPopMatrix();
        GL11.glPushMatrix();
        GL11.glTranslated(0.5D, 0.4D, 0.5D);
        ItemNodeRenderer.renderItemNode(tjf);
        GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
        ItemNodeRenderer.renderItemNode(tjf);
        GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
        ItemNodeRenderer.renderItemNode(tjf);
        GL11.glPopMatrix();


        GL11.glPushMatrix();
        GL11.glTranslatef(0.5F, 0.5F, 0.5F);
        GL11.glEnable(3042);
        GL11.glBlendFunc(770, 771);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
        this.rb.useInventoryTint = true;
        this.rb.renderBlockAsItem(RegisteredBlocks.blockExtendedNodeJar, item.getItemDamage(), 1.0F);
        GL11.glPopMatrix();


        GL11.glEnable(32826);
    }
}
 
Example 3
Source File: StickyJarResearchItem.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
public StickyJarResearchItem(String key, int col, int row, int complex, AspectList tags) {
    super(key, col, row, complex, tags, new ItemStack(ConfigBlocks.blockJar));
}
 
Example 4
Source File: BlockExtendedNodeJar.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public IIcon getIcon(int side, int meta) {
    BlockJar jar = (BlockJar) ConfigBlocks.blockJar;
    return side == 1 ? jar.iconJarTop : side == 0 ? jar.iconJarBottom : jar.iconJarSide;
}