Created
February 18, 2013 08:51
-
-
Save mDiyo/4976001 to your computer and use it in GitHub Desktop.
Inventory Block Render
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void renderStandardInvBlock(RenderBlocks renderblocks, Block block, int meta) | |
{ | |
Tessellator tessellator = Tessellator.instance; | |
GL11.glTranslatef(-0.5F, -0.5F, -0.5F); | |
tessellator.startDrawingQuads(); | |
tessellator.setNormal(0.0F, -1F, 0.0F); | |
renderblocks.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(0, meta)); | |
tessellator.draw(); | |
tessellator.startDrawingQuads(); | |
tessellator.setNormal(0.0F, 1.0F, 0.0F); | |
renderblocks.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(1, meta)); | |
tessellator.draw(); | |
tessellator.startDrawingQuads(); | |
tessellator.setNormal(0.0F, 0.0F, -1F); | |
renderblocks.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(2, meta)); | |
tessellator.draw(); | |
tessellator.startDrawingQuads(); | |
tessellator.setNormal(0.0F, 0.0F, 1.0F); | |
renderblocks.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(3, meta)); | |
tessellator.draw(); | |
tessellator.startDrawingQuads(); | |
tessellator.setNormal(-1F, 0.0F, 0.0F); | |
renderblocks.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(4, meta)); | |
tessellator.draw(); | |
tessellator.startDrawingQuads(); | |
tessellator.setNormal(1.0F, 0.0F, 0.0F); | |
renderblocks.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(5, meta)); | |
tessellator.draw(); | |
GL11.glTranslatef(0.5F, 0.5F, 0.5F); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment