/** Renders the TileEntity for the position. */
  public void renderTileEntityFillingStationAt(
      TileEntityFillingStation tile, double par2, double par4, double par6, float par8) {
    int var9;

    if (!tile.isInWorld()) var9 = 0;
    else var9 = tile.getBlockMetadata();

    ModelFillingStation var14;
    var14 = FillingStationModel;
    // ModelFillingStationV var15;
    // var14 = this.FillingStationModelV;
    this.bindTextureByName("/Reika/RotaryCraft/Textures/TileEntityTex/fillingtex.png");

    GL11.glPushMatrix();
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float) par2, (float) par4 + 2.0F, (float) par6 + 1.0F);
    GL11.glScalef(1.0F, -1.0F, -1.0F);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    int var11 = 0; // used to rotate the model about metadata

    if (tile.isInWorld()) {
      switch (tile.getBlockMetadata()) {
        case 0:
          var11 = 180;
          break;
        case 1:
          var11 = 0;
          break;
        case 2:
          var11 = 270;
          break;
        case 3:
          var11 = 90;
          break;
      }

      GL11.glRotatef((float) var11 - 90, 0.0F, 1.0F, 0.0F);
    }

    var14.renderAll(tile, null, -tile.phi, 0);

    if (tile.isInWorld()) GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  }
 private void renderLiquid(TileEntity tile, double par2, double par4, double par6) {
   GL11.glTranslated(par2, par4, par6);
   TileEntityFillingStation tr = (TileEntityFillingStation) tile;
   double dx = 0;
   double dz = 0;
   double ddx = 0;
   double ddz = 0;
   switch (tr.getBlockMetadata()) {
     case 0:
       dx = 0.25;
       break;
     case 1:
       ddx = 0.25;
       break;
     case 2:
       dz = 0.25;
       break;
     case 3:
       ddz = 0.25;
       break;
   }
   if (!tr.isEmpty() && tr.isInWorld()) {
     Fluid f = tr.getFluid();
     if (!f.equals(FluidRegistry.LAVA)) {
       GL11.glEnable(GL11.GL_BLEND);
     }
     ReikaLiquidRenderer.bindFluidTexture(f);
     IIcon ico = f.getIcon();
     float u = ico.getMinU();
     float v = ico.getMinV();
     float du = ico.getMaxU();
     float dv = ico.getMaxV();
     double h = 0.0625 + 14D / 16D * tr.getLevel() / tr.CAPACITY;
     Tessellator v5 = Tessellator.instance;
     if (f.getLuminosity() > 0) ReikaRenderHelper.disableLighting();
     v5.startDrawingQuads();
     v5.setNormal(0, 1, 0);
     v5.addVertexWithUV(dx + 0, h, -ddz + 1, u, dv);
     v5.addVertexWithUV(-ddx + 1, h, -ddz + 1, du, dv);
     v5.addVertexWithUV(-ddx + 1, h, dz + 0, du, v);
     v5.addVertexWithUV(dx + 0, h, dz + 0, u, v);
     v5.draw();
     ReikaRenderHelper.enableLighting();
   }
   GL11.glTranslated(-par2, -par4, -par6);
   GL11.glDisable(GL11.GL_BLEND);
 }