@Override public void renderTileEntityAt(TileEntity t, double x, double y, double z, float pt) { Block blockType = t.getBlockType(); Tessellator tes = Tessellator.instance; tes.setColorOpaque_F(1.0F, 1.0F, 1.0F); renderBlocks.blockAccess = t.getWorldObj(); { if (Minecraft.isAmbientOcclusionEnabled()) { GL11.glShadeModel(GL11.GL_SMOOTH); } else { GL11.glShadeModel(GL11.GL_FLAT); } RenderHelper.disableStandardItemLighting(); RenderUtils.loadTexture(TextureMap.locationBlocksTexture); tes.startDrawingQuads(); tes.setTranslation(x - t.xCoord, y - t.yCoord, z - t.zCoord); renderBlocks.renderBlockAllFaces(blockType, t.xCoord, t.yCoord, t.zCoord); tes.setTranslation(0, 0, 0); tes.draw(); RenderHelper.enableStandardItemLighting(); } }
@Override public void draw(ScaledResolution sr) { double width = sr.getScaledWidth_double(), height = sr.getScaledHeight_double(); AppFreqTransmitter app = AppFreqTransmitter.instance; GL11.glPushMatrix(); { GL11.glTranslated(15, 15, 0); final float isize = 18; final float fsize = 10; String str = app.getDisplayName(); double len = Font.font.strLen(str, fsize); drawBox(0, 0, 30 + len, 18); ResourceLocation icon = app.getIcon(); RenderUtils.loadTexture(icon); GL11.glColor4d(1, 1, 1, 1); HudUtils.rect(2, 0, isize, isize); Font.font.draw(str, isize + 6, 4, fsize, 0xffffff); } GL11.glPopMatrix(); current.handleDraw(width, height); GL11.glColor4d(1, 1, 1, 1); }