@Override
 @SideOnly(Side.CLIENT)
 public void renderFormedStructure() {
   if (renderStack == null)
     renderStack =
         new ItemStack(
             IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.EXCAVATOR.getMeta());
   if (renderStack2 == null)
     renderStack2 =
         new ItemStack(
             IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.BUCKET_WHEEL.getMeta());
   GlStateManager.translate(2, 3.5, 2.875);
   GlStateManager.rotate(-225, 0, 1, 0);
   GlStateManager.rotate(-20, 1, 0, 0);
   double s = 5.25;
   GlStateManager.scale(s, s, s);
   GlStateManager.disableCull();
   ClientUtils.mc()
       .getRenderItem()
       .renderItem(renderStack, ItemCameraTransforms.TransformType.GUI);
   GlStateManager.scale(1 / s, 1 / s, 1 / s);
   GlStateManager.rotate(20, 1, 0, 0);
   GlStateManager.rotate(225, 0, 1, 0);
   GlStateManager.translate(2.5, 0, -1.375);
   GlStateManager.rotate(-45, 0, 1, 0);
   GlStateManager.rotate(-20, 1, 0, 0);
   GlStateManager.scale(6.875, 6.875, 6.875);
   ClientUtils.mc()
       .getRenderItem()
       .renderItem(renderStack2, ItemCameraTransforms.TransformType.GUI);
   GlStateManager.enableCull();
 }
  public static void dispatch() {
    Profiler profiler = ClientUtils.mc().mcProfiler;
    profiler.startSection(ImmersiveEngineering.MODID + "-particles");

    boolean isLightingEnabled = GL11.glGetBoolean(GL11.GL_LIGHTING);
    GL11.glDepthMask(false);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glEnable(GL11.GL_LIGHTING);

    for (String key : EntityFXIEBase.queuedRenders.keySet()) {
      profiler.endStartSection(key);
      int i = 0;
      ClientUtils.tes().startDrawingQuads();
      for (EntityFXIEBase particle : EntityFXIEBase.queuedRenders.get(key)) {
        if ((i++) == 0)
          ClientUtils.mc().getTextureManager().bindTexture(particle.getParticleTexture());
        particle.tessellateFromQueue(ClientUtils.tes());
      }
      ClientUtils.tes().draw();
    }
    EntityFXIEBase.queuedRenders.clear();

    profiler.startSection("depthIgnoring");
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    for (String key : EntityFXIEBase.queuedDepthIgnoringRenders.keySet()) {
      profiler.endStartSection(key);
      int i = 0;
      ClientUtils.tes().startDrawingQuads();
      for (EntityFXIEBase particle : EntityFXIEBase.queuedDepthIgnoringRenders.get(key)) {
        if ((i++) == 0)
          ClientUtils.mc().getTextureManager().bindTexture(particle.getParticleTexture());
        particle.tessellateFromQueue(ClientUtils.tes());
      }
      ClientUtils.tes().draw();
    }
    EntityFXIEBase.queuedDepthIgnoringRenders.clear();
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    profiler.endSection();

    if (!isLightingEnabled) GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glDepthMask(true);

    profiler.endSection();
  }
  @Override
  public void renderTileEntityAt(
      TileEntityChargingStation te,
      double x,
      double y,
      double z,
      float partialTicks,
      int destroyStage) {
    if (te.getWorld() != null && te.getWorld().isBlockLoaded(te.getPos(), false)) {
      GlStateManager.pushMatrix();
      GlStateManager.translate(x + .5, y + .3125, z + .5);
      GlStateManager.scale(.75f, .75f, .75f);
      ClientUtils.bindAtlas();
      switch (te.facing) {
        case NORTH:
          GlStateManager.rotate(180, 0, 1, 0);
          break;
        case SOUTH:
          break;
        case WEST:
          GlStateManager.rotate(-90, 0, 1, 0);
          break;
        case EAST:
          GlStateManager.rotate(90, 0, 1, 0);
          break;
      }
      if (te.inventory[0] != null) {
        GlStateManager.pushMatrix();
        float scale = .625f;
        GlStateManager.scale(scale, scale, 1);
        ClientUtils.mc()
            .getRenderItem()
            .renderItem(te.inventory[0], ItemCameraTransforms.TransformType.FIXED);
        GlStateManager.popMatrix();

        //				if(!RenderManager.instance.options.fancyGraphics &&
        // MinecraftForgeClient.getItemRenderer(te.inventory, ItemRenderType.ENTITY)==null)
        //				{
        //					float rot = te.facing==3?180: te.facing==4?-90: te.facing==5?90: 0;
        //					GL11.glRotatef(rot - RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
        //				}
        //				EntityItem entityitem = new EntityItem(te.getWorld(), 0.0D, 0.0D, 0.0D, te.inventory);
        //				entityitem.hoverStart = 0.0F;
        //				RenderItem.renderInFrame = true;
        //				RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F,
        // 0.0F);
        //				RenderItem.renderInFrame = false;
      }
      GlStateManager.popMatrix();
    }
  }