Hi,
I am trying to make a TileEntitySpecialRender render a cube (currently with the TextureMap.LOCATION_MISSING_TEXTURE texture) On a TileEntity. I have not modded much in the past, and am brand new to VertexBuffers, so chances are my code is stupid & I am doing everything wrong (seriously, I copied and pasted some old code and tried to make it work). Currently, the texture is being rendered in the sky, HOWEVER it is relative to the player. Here is my current code (contained in a function which launches in renderTileEntityAt):
GlStateManager.color(1F, 1F, 1F);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer wr = tessellator.getBuffer();
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
wr.pos(6, 12, 0).tex(0, 1).endVertex();
wr.pos(12, 12, 0).tex(1, 1).endVertex();
wr.pos(12, 6, 0).tex(1, 0).endVertex();
wr.pos(6, 6, 0).tex(0, 0).endVertex();
tessellator.draw();
If anyone could help / give me tips on how this system works that would be great.
Thanks in advance
- Matthew