private void renderOverlay(
     TileAnimationTablet tablet,
     ResourceLocation texture,
     int rotationMod,
     boolean useLighting,
     boolean useBlend,
     double size,
     float height,
     float forceDeg) {
   Minecraft mc = ClientHelper.minecraft();
   mc.renderEngine.bindTexture(texture);
   GL11.glPushMatrix();
   GL11.glDepthMask(false);
   if (!useLighting) GL11.glDisable(GL11.GL_LIGHTING);
   if (useBlend) {
     GL11.glEnable(GL11.GL_BLEND);
     GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
   }
   GL11.glTranslatef(0.5F, height, 0.5F);
   float deg = rotationMod == 0 ? forceDeg : (float) (tablet.ticksExisted * rotationMod % 360F);
   GL11.glRotatef(deg, 0F, 1F, 0F);
   GL11.glColor4f(1F, 1F, 1F, 1F);
   Tessellator tess = Tessellator.instance;
   double size1 = size / 2;
   double size2 = -size1;
   tess.startDrawingQuads();
   tess.addVertexWithUV(size2, 0, size1, 0, 1);
   tess.addVertexWithUV(size1, 0, size1, 1, 1);
   tess.addVertexWithUV(size1, 0, size2, 1, 0);
   tess.addVertexWithUV(size2, 0, size2, 0, 0);
   tess.draw();
   GL11.glDepthMask(true);
   if (!useLighting) GL11.glEnable(GL11.GL_LIGHTING);
   GL11.glPopMatrix();
 }
 private void renderItem(TileAnimationTablet tablet) {
   ItemStack stack = tablet.getStackInSlot(0);
   Minecraft mc = ClientHelper.minecraft();
   if (stack != null) {
     EntityItem entityitem = new EntityItem(tablet.worldObj, 0.0D, 0.0D, 0.0D, stack);
     entityitem.getEntityItem().stackSize = 1;
     entityitem.hoverStart = 0.0F;
     GL11.glPushMatrix();
     GL11.glTranslatef(0.5F, 0.55F, 0F);
     if (stack.getItem() instanceof ItemBlock) GL11.glScalef(2.5F, 2.5F, 2.5F);
     else GL11.glScalef(1.5F, 1.5F, 1.5F);
     RenderItem.renderInFrame = true;
     RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
     RenderItem.renderInFrame = false;
     GL11.glPopMatrix();
   }
 }
 private void renderOverlay(TileRepairer tablet, ResourceLocation texture, double size) {
   Minecraft mc = ClientHelper.minecraft();
   mc.renderEngine.bindTexture(texture);
   GL11.glPushMatrix();
   GL11.glDepthMask(false);
   GL11.glEnable(GL11.GL_BLEND);
   GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
   GL11.glTranslatef(0F, -0.525F, 0F);
   float deg = tablet.ticksExisted * 0.75F % 360F;
   GL11.glRotatef(deg, 0F, 1F, 0F);
   GL11.glColor4f(1F, 1F, 1F, 1F);
   Tessellator tess = Tessellator.instance;
   double size1 = size / 2;
   double size2 = -size1;
   tess.startDrawingQuads();
   tess.addVertexWithUV(size2, 0, size1, 0, 1);
   tess.addVertexWithUV(size1, 0, size1, 1, 1);
   tess.addVertexWithUV(size1, 0, size2, 1, 0);
   tess.addVertexWithUV(size2, 0, size2, 0, 0);
   tess.draw();
   GL11.glDepthMask(true);
   GL11.glEnable(GL11.GL_LIGHTING);
   GL11.glPopMatrix();
 }
 @Override
 public int getFocusColor() {
   EntityPlayer player = ClientHelper.clientPlayer();
   return Color.HSBtoRGB((player.ticksExisted * 2 % 360) / 360F, 1F, 1F);
 }