@Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { if (modelID == id) { final Tessellator tes = Tessellator.instance; final int offset = MathHelper.clamp_int(metadata, 0, 5) * 4; final BlockBeeBox beeBox = (BlockBeeBox) block; final IIcon[] icons = { beeBox.getIcon(0, metadata), beeBox.getIcon(1, metadata), beeBox.getIcon(2, metadata), beeBox.getIcon(3, metadata), beeBox.getIcon(4, metadata), beeBox.getIcon(5, metadata) }; final double d = 0.0625D; // LEGS renderer.setRenderBounds(3 * d, 0.0D, 3 * d, 5 * d, 3 * d, 5 * d); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); renderer.setRenderBounds(11 * d, 0.0D, 3 * d, 13 * d, 3 * d, 5 * d); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); renderer.setRenderBounds(3 * d, 0.0D, 11 * d, 5 * d, 3 * d, 13 * d); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); renderer.setRenderBounds(11 * d, 0.0D, 11 * d, 13 * d, 3 * d, 13 * d); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); // BODY renderer.setRenderBounds(1 * d, 3 * d, 1 * d, 15 * d, 10 * d, 15 * d); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); // ROOF renderer.setRenderBounds(0.0D, 10 * d, 0.0D, 1.0D, 13 * d, 1.0D); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); renderer.setRenderBounds(2 * d, 13 * d, 2 * d, 14 * d, 1.0D, 14 * d); RenderUtils.renderInventoryBlockOverride(block, renderer, icons, tes); } }
@Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { if (modelID == RENDER_ID) { final BlockBrewKettle brewKettle = (BlockBrewKettle) block; final Tessellator tes = Tessellator.instance; final IIcon[] icon = { brewKettle.getIconByIndex(0), brewKettle.getIconByIndex(3), brewKettle.getIconByIndex(2), brewKettle.getIconByIndex(2), brewKettle.getIconByIndex(2), brewKettle.getIconByIndex(2) }; renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); // Outer Kettle RenderUtils.renderInventoryBlockOverride(block, renderer, icon, tes); final float f = 0.125F; GL11.glTranslatef(-0.5F, -0.5F, -0.5F); // Inner Kettle RenderUtils.drawFace( RenderUtils.Face.ZNEG, block, renderer, tes, brewKettle.getIconByIndex(2), 0.0D, 0.0D, (double) (0.0F + 1.0F - f)); RenderUtils.drawFace( RenderUtils.Face.ZPOS, block, renderer, tes, brewKettle.getIconByIndex(2), 0.0D, 0.0D, (double) (0.0F - 1.0F + f)); RenderUtils.drawFace( RenderUtils.Face.XNEG, block, renderer, tes, brewKettle.getIconByIndex(2), (double) (0.0F + 1.0F - f), 0.0D, 0.0D); RenderUtils.drawFace( RenderUtils.Face.XPOS, block, renderer, tes, brewKettle.getIconByIndex(2), (double) (0.0F - 1.0F + f), 0.0D, 0.0D); RenderUtils.drawFace( RenderUtils.Face.YPOS, block, renderer, tes, brewKettle.getIconByIndex(1), 0.0D, (double) (0.0F - 1.0F + 0.25F), 0.0D); RenderUtils.drawFace( RenderUtils.Face.YNEG, block, renderer, tes, brewKettle.getIconByIndex(1), 0.0D, (double) (0.0F + 1.0F - 0.75F), 0.0D); GL11.glTranslatef(0.5F, 0.5F, 0.5F); renderer.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); } }