I'm developing a Minecraft mod with Forge. I've added a tileentity and a custom renderer for it. The problem is: The block is only visible from sertain angles. I've compaed my code to other peoples code and it looks pretty much like them.
The block is opaque and not to be rendered and the renderer is registered normally so the fault must be in the renderer.
Here's the renderer code:
public class TERender extends TileEntitySpecialRenderer
{
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)d, (float)d1, (float)d2);
HeatConductTileEntity TE = (HeatConductTileEntity)tileEntity;
renderBlock(TE, tileEntity.getWorldObj(), tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, mod.EMHeatConductor);
GL11.glPopMatrix();
}
public void renderBlock(HeatConductTileEntity tl, World world, int i, int j, int k, Block block)
{
Tessellator tessellator = Tessellator.instance;
GL11.glColor3f(1, 1, 1);
tessellator.startDrawingQuads();
tessellator.addVertex(0, 0, 0);
tessellator.addVertex(1, 0, 0);
tessellator.addVertex(1, 1, 0);
tessellator.addVertex(0, 1, 0);
tessellator.draw();
}
}