public static void drawPlayerOnGui(
     Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5) {
   GL11.glEnable(GL11.GL_COLOR_MATERIAL);
   GL11.glPushMatrix();
   GL11.glTranslatef((float) par1, (float) par2, 50.0F);
   GL11.glScalef((float) (-par3), (float) par3, (float) par3);
   GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
   float f2 = par0Minecraft.thePlayer.renderYawOffset;
   float f3 = par0Minecraft.thePlayer.rotationYaw;
   float f4 = par0Minecraft.thePlayer.rotationPitch;
   par4 -= 19;
   GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
   RenderHelper.enableStandardItemLighting();
   GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
   GL11.glRotatef(-((float) Math.atan((double) (par5 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
   par0Minecraft.thePlayer.renderYawOffset = (float) Math.atan((double) (par4 / 40.0F)) * 20.0F;
   par0Minecraft.thePlayer.rotationYaw = (float) Math.atan((double) (par4 / 40.0F)) * 40.0F;
   par0Minecraft.thePlayer.rotationPitch = -((float) Math.atan((double) (par5 / 40.0F))) * 20.0F;
   par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
   GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
   RenderManager.instance.playerViewY = 180.0F;
   RenderManager.instance.renderEntityWithPosYaw(
       par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
   par0Minecraft.thePlayer.renderYawOffset = f2;
   par0Minecraft.thePlayer.rotationYaw = f3;
   par0Minecraft.thePlayer.rotationPitch = f4;
   GL11.glPopMatrix();
   RenderHelper.disableStandardItemLighting();
   GL11.glDisable(GL12.GL_RESCALE_NORMAL);
   OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
   GL11.glDisable(GL11.GL_TEXTURE_2D);
   OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
 }
  public void renderFrame() {
    Tessellator tes = Tessellator.instance;

    // translate to middle
    GL11.glTranslatef(0.5f, 0.5f, 0.5f);

    this.bindTexture(textureFrame);
    {
      // NORTH
      renderFrameFrontBack();
      GL11.glRotatef(-90, 0, 1, 0);
      // EAST
      renderFrameFrontBack();
      GL11.glRotatef(-90, 0, 1, 0);
      // SOUTH
      renderFrameFrontBack();
      GL11.glRotatef(-90, 0, 1, 0);
      // WEST
      renderFrameFrontBack();
      GL11.glRotatef(270, 0, 1, 0);

      // TOP
      GL11.glRotatef(-90, 1, 0, 0);
      renderFrameFrontBack();
      // DRAW BOTTOM
      GL11.glRotatef(180, 1, 0, 0);
      renderFrameFrontBack();
      // Reset rotation
      GL11.glRotatef(-180, 1, 0, 0);
      GL11.glRotatef(90, 1, 0, 0);
    }

    // undo translation
    GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
  }
  /** Sets the models various rotation angles then renders the model. */
  public void render(
      Entity p_78088_1_,
      float p_78088_2_,
      float p_78088_3_,
      float p_78088_4_,
      float p_78088_5_,
      float p_78088_6_,
      float p_78088_7_) {
    GL11.glPushMatrix();
    GL11.glScalef(2.0F, 2.0F, 2.0F);
    GL11.glTranslatef(0.0F, -0.5F, 0.0F);

    if (this.base != null) {
      this.base.render(p_78088_7_);
    }

    GL11.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
    GL11.glTranslatef(0.0F, 0.8F + p_78088_4_, 0.0F);
    GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
    this.glass.render(p_78088_7_);
    float var8 = 0.875F;
    GL11.glScalef(var8, var8, var8);
    GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
    GL11.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
    this.glass.render(p_78088_7_);
    GL11.glScalef(var8, var8, var8);
    GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
    GL11.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
    this.cube.render(p_78088_7_);
    GL11.glPopMatrix();
  }
 @SubscribeEvent(priority = EventPriority.LOWEST)
 @Optional.Method(modid = Mods.OpenComputers)
 public void onRobotRender(RobotRenderEvent e) {
   if (!rendering) {
     return;
   }
   if (e.mountPoints == null || e.mountPoints.length < 2) {
     return;
   }
   MountPoint mountPoint = e.mountPoints[1];
   GL11.glPushMatrix();
   GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
   GL11.glTranslatef(0.5f, 0.5f, 0.5f);
   GL11.glColor3f(color.r, color.g, color.b);
   float degrees = 360 - ((time % 160) / 160F * 360F);
   Minecraft.getMinecraft().getTextureManager().bindTexture(modelRadar);
   GL11.glDisable(GL11.GL_CULL_FACE);
   GL11.glRotatef(180, 1, 0, 0);
   GL11.glRotatef(
       mountPoint.rotation.getW(),
       mountPoint.rotation.getX(),
       mountPoint.rotation.getY(),
       mountPoint.rotation.getZ());
   GL11.glTranslatef(0F, -0.8F, 0F);
   GL11.glTranslatef(mountPoint.offset.getX(), mountPoint.offset.getY(), mountPoint.offset.getZ());
   GL11.glScalef(0.3f, 0.3f, 0.3f);
   GL11.glPushMatrix();
   radarModel.render(Math.max(degrees, 0));
   GL11.glPopMatrix();
   GL11.glPopMatrix();
   GL11.glPopAttrib();
 }
  /** Sets the models various rotation angles then renders the model. */
  public void render(
      Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
    this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);

    if (this.isChild) {
      float var8 = 2.0F;
      GL11.glPushMatrix();
      GL11.glScalef(1.5F / var8, 1.5F / var8, 1.5F / var8);
      GL11.glTranslatef(0.0F, 10.0F * par7, 4.0F * par7);
      this.ocelotHead.render(par7);
      GL11.glPopMatrix();
      GL11.glPushMatrix();
      GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
      GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
      this.ocelotBody.render(par7);
      this.ocelotBackLeftLeg.render(par7);
      this.ocelotBackRightLeg.render(par7);
      this.ocelotFrontLeftLeg.render(par7);
      this.ocelotFrontRightLeg.render(par7);
      this.ocelotTail.render(par7);
      this.ocelotTail2.render(par7);
      GL11.glPopMatrix();
    } else {
      this.ocelotHead.render(par7);
      this.ocelotBody.render(par7);
      this.ocelotTail.render(par7);
      this.ocelotTail2.render(par7);
      this.ocelotBackLeftLeg.render(par7);
      this.ocelotBackRightLeg.render(par7);
      this.ocelotFrontLeftLeg.render(par7);
      this.ocelotFrontRightLeg.render(par7);
    }
  }
  @Override
  public void renderTileEntityAt(
      TileEntity tileentity, double d0, double d1, double d2, float partialTicks) {
    TileAnimationTablet tile = (TileAnimationTablet) tileentity;

    int meta = tile.getBlockMetadata() & 7;
    if (meta < 2) meta = 2; // Just in case

    int rotation = meta == 2 ? 270 : meta == 3 ? 90 : meta == 4 ? 0 : 180;

    GL11.glPushMatrix();
    GL11.glTranslated(d0, d1, d2);
    renderOverlay(tile, overlayCenter, -1, false, false, 0.65, 0.13F, 0F);
    if (tile.leftClick) renderOverlay(tile, overlayLeft, 1, false, true, 1, 0.13F, 0F);
    else renderOverlay(tile, overlayRight, 1, false, true, 1, 0.131F, 0F);
    renderOverlay(tile, overlayIndent, 0, false, false, 0.5F, 0.13F, rotation + 90F);

    GL11.glRotatef(rotation, 0F, 1F, 0F);
    GL11.glTranslated(0.1, 0.2 + Math.cos(System.currentTimeMillis() / 600D) / 18F, 0.5);
    float[] translations = TRANSLATIONS[meta - 2];
    GL11.glTranslatef(translations[0], translations[1], translations[2]);
    GL11.glScalef(0.8F, 0.8F, 0.8F);
    GL11.glTranslatef(0.5F, 0F, 0.5F);
    GL11.glRotatef(tile.swingProgress, 0F, 0F, 1F);
    GL11.glTranslatef(-0.5F, 0F, -0.5F);
    GL11.glTranslatef(-tile.swingProgress / 250F, tile.swingProgress / 1000F, 0F);
    GL11.glRotatef((float) Math.cos(System.currentTimeMillis() / 400F) * 5F, 1F, 0F, 1F);
    renderItem(tile);
    GL11.glPopMatrix();
  }
Exemple #7
0
  public void transform(ItemRenderType type) {
    final EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;

    if (type == ItemRenderType.EQUIPPED) {
      GL11.glRotatef(70, 1.0F, 0, 0);
      GL11.glRotatef(-10, 0.0F, 1, 0);
      GL11.glRotatef(50, 0.0F, 1, 1);
      GL11.glScalef(3.8F, 4.1F, 3.8F);
      GL11.glTranslatef(0.25F, 1.2F, 0F);
    }

    if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
      GL11.glTranslatef(0.0F, -0.9F, 0.0F);
      GL11.glRotatef(0, 0, 0, 1);
      GL11.glRotatef(45, 0, 1, 0);
      GL11.glRotatef(90, 1, 0, 0);
      GL11.glTranslatef(5.5F, 7.0F, -8.5F);
      GL11.glScalef(6.2F, 8.2F, 6.2F);
    }

    GL11.glScalef(-0.4F, -0.4F, 0.4F);

    if (type == ItemRenderType.INVENTORY || type == ItemRenderType.ENTITY) {
      if (type == ItemRenderType.INVENTORY) {
        GL11.glTranslatef(0, -1.9F, 0);
        GL11.glScalef(0.7F, 0.6F, 0.7F);
        GL11.glRotatef(225F, 0F, 1F, 0F);
      } else {
        GL11.glTranslatef(0, -3.9F, 0);
      }

      GL11.glScalef(1.3F, 1.3F, 1.3F);
    }
  }
  @Override
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    float field_78145_g = 8.0F;
    float field_78151_h = 4.0F;

    if (this.isChild) {
      float var8 = 2.0F;
      GL11.glPushMatrix();
      GL11.glTranslatef(0.0F, field_78145_g * f5, field_78151_h * f5);
      HEADROT.render(f5);
      GL11.glPopMatrix();
      GL11.glPushMatrix();
      GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
      GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
      Body.render(f5);
      Body.render(f5);
      wingrig.render(f5);
      winglef.render(f5);
      tail.render(f5);
      LEGRIGTOPROT.render(f5);
      LEGLEFTOPROT.render(f5);
      GL11.glPopMatrix();
    } else {
      Body.render(f5);
      wingrig.render(f5);
      winglef.render(f5);
      tail.render(f5);
      LEGRIGTOPROT.render(f5);
      LEGLEFTOPROT.render(f5);
      HEADROT.render(f5);
    }
  }
 @Override
 @SideOnly(Side.CLIENT)
 public void preRender(
     Entity entity, BodyPart[] parts, BodyPartLocation location, ModelBase model) {
   RenderBlocks renderBlocks = new RenderBlocks();
   ClientProxy.bindTexture(TextureMap.locationItemsTexture);
   GL11.glEnable(GL11.GL_CULL_FACE);
   if (location == BodyPartLocation.Torso) {
     GL11.glPushMatrix();
     GL11.glScalef(1.0F, -1.0F, 1.0F);
     GL11.glTranslatef(0.4F, 0.4F, 0.0F);
     GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
     renderBlocks.renderBlockAsItem(Block.mushroomRed, 0, 1.0F);
     GL11.glTranslatef(0.1F, 0.0F, -0.4F);
     GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
     renderBlocks.renderBlockAsItem(Block.mushroomRed, 0, 1.0F);
     GL11.glPopMatrix();
   }
   if (location == BodyPartLocation.Head) {
     GL11.glPushMatrix();
     head[0].postRender(0.0625F);
     GL11.glScalef(1.0F, -1.0F, 1.0F);
     GL11.glTranslatef(0.0F, 0.75F, -0.1F);
     GL11.glRotatef(12.0F, 0.0F, 1.0F, 0.0F);
     renderBlocks.renderBlockAsItem(Block.mushroomRed, 0, 1.0F); // head
     GL11.glPopMatrix();
   }
   GL11.glDisable(GL11.GL_CULL_FACE);
   ClientProxy.bindTexture(texture);
 }
  @SideOnly(Side.CLIENT)
  @ForgeSubscribe
  public void renderHealthBar(RenderGameOverlayEvent event) {
    if (event.type == ElementType.FOOD && clientPlayerHP > 0) {
      if (event instanceof RenderGameOverlayEvent.Post) {
        Minecraft mc = MiscHelper.getMc();

        int x = event.resolution.getScaledWidth() / 2 + 10;
        int y = event.resolution.getScaledHeight() - 39;

        GL11.glTranslatef(0F, 10F, 0F);
        mc.renderEngine.bindTexture(LibResources.GUI_SOUL_HEARTS);
        int it = 0;
        for (int i = 0; i < clientPlayerHP; i++) {
          boolean half = i == clientPlayerHP - 1 && clientPlayerHP % 2 != 0;
          if (half || i % 2 == 0) {
            renderHeart(x + it * 8, y, !half);
            it++;
          }
        }

        mc.renderEngine.bindTexture("/gui/icons.png");
      }

      GL11.glTranslatef(0F, -10F, 0F);
    }

    if (event.type == ElementType.AIR
        && event instanceof RenderGameOverlayEvent.Post
        && clientPlayerHP > 0) GL11.glTranslatef(0F, 10F, 0F);
  }
 private void renderMenuBlock(Block block, float f, RenderBlocks renderblocks) {
   int i = block.getRenderType();
   renderblocks.setRenderBoundsFromBlock(block);
   Tessellator tessellator = Tessellator.instance;
   if (i == 0) {
     block.setBlockBoundsForItemRender();
     GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
     float f1 = 0.5F;
     float f2 = 1.0F;
     float f3 = 0.8F;
     float f4 = 0.6F;
     tessellator.startDrawingQuads();
     tessellator.setColorRGBA_F(f2, f2, f2, f);
     renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSide(0));
     tessellator.setColorRGBA_F(f1, f1, f1, f);
     renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSide(1));
     tessellator.setColorRGBA_F(f3, f3, f3, f);
     renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSide(2));
     renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSide(3));
     tessellator.setColorRGBA_F(f4, f4, f4, f);
     renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSide(4));
     renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSide(5));
     tessellator.draw();
     GL11.glTranslatef(0.5F, 0.5F, 0.5F);
   }
 }
  public void doRender(Entity entity, double x, double y, double z, float f, float f1) {
    f = 0.0625f;
    RenderState.blendingOn();
    int timestep = (int) ((System.currentTimeMillis()) % 10000);
    double angle = timestep * Math.PI / 5000.0;
    GL11.glPushMatrix();
    GL11.glRotatef(180.0f, 1.0f, 0, 0);
    GL11.glTranslatef(0.5f, -1.5f, -0.5f);
    middletable.render(f);
    uppertable.render(f);
    footbase.render(f);
    foot1.render(f);
    fatfoot2.render(f);
    fatfoot1.render(f);
    backsupport.render(f);
    tank3.render(f);
    tank2.render(f);
    tank1.render(f);
    wireshort4.render(f);
    wireshort3.render(f);
    wireshort2.render(f);
    Wireshort1.render(f);
    Wirelong1.render(f);

    RenderState.glowOn();
    GL11.glPopMatrix();
    GL11.glPushMatrix();
    GL11.glTranslated(0.5f, 1.05f, 0.5f);
    GL11.glTranslated(0, 0.02f * Math.sin(angle * 3), 0);
    // GLRotate uses degrees instead of radians for some reason grr
    GL11.glRotatef((float) (angle * 57.2957795131), 0.0f, 1.0f, 0.0f);
    GL11.glRotatef(45f, 1.0f, 0.0f, 0.0f);
    // arctangent of 0.5.
    GL11.glRotatef(35.2643897f, 0, 1, 1);
    // cube.render(0.0625f);
    GL11.glColor4d(1, 1, 1, 0.8);
    cube.render(f / 2.0f);
    // cube.render(0.016000f);
    GL11.glPopMatrix();
    GL11.glPushMatrix();
    GL11.glRotatef(180.0f, 1.0f, 0, 0);
    GL11.glTranslatef(0.5f, -1.5f, -0.5f);
    screen3.render(f);
    screen2.render(f);
    screen1.render(f);
    particles.render(f);
    GL11.glPopMatrix();
    // GL11.glPushMatrix();
    // if (Minecraft.getMinecraft().isFancyGraphicsEnabled()) {
    // if (f1 != 0) {
    // GL11.glDisable(GL11.GL_CULL_FACE);
    // for (int i = 0; i < 1; i++) {
    // drawScanLine(angle);
    // }
    // }
    // }
    // GL11.glPopMatrix();
    RenderState.glowOff();
    RenderState.blendingOff();
  }
  public void renderArrow(
      ProjectileConfusion proj, double par2, double par4, double par6, float par8, float par9) {
    this.bindEntityTexture(proj);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) par2, (float) par4, (float) par6);
    GL11.glRotatef(
        proj.prevRotationYaw + (proj.rotationYaw - proj.prevRotationYaw) * par9 - 90.0F,
        0.0F,
        1.0F,
        0.0F);
    GL11.glRotatef(
        proj.prevRotationPitch + (proj.rotationPitch - proj.prevRotationPitch) * par9,
        0.0F,
        0.0F,
        1.0F);
    Tessellator tessellator = Tessellator.instance;
    byte b0 = 0;
    float f2 = 0.0F;
    float f3 = 0.5F;
    float f4 = (float) (0 + b0 * 10) / 32.0F;
    float f5 = (float) (5 + b0 * 10) / 32.0F;
    float f6 = 0.0F;
    float f7 = 0.15625F;
    float f8 = (float) (5 + b0 * 10) / 32.0F;
    float f9 = (float) (10 + b0 * 10) / 32.0F;
    float f10 = 0.05625F;
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);

    GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
    GL11.glScalef(f10, f10, f10);
    GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
    GL11.glNormal3f(f10, 0.0F, 0.0F);
    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8);
    tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8);
    tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9);
    tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9);
    tessellator.draw();
    GL11.glNormal3f(-f10, 0.0F, 0.0F);
    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8);
    tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8);
    tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9);
    tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9);
    tessellator.draw();

    for (int i = 0; i < 4; ++i) {
      GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
      GL11.glNormal3f(0.0F, 0.0F, f10);
      tessellator.startDrawingQuads();
      tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4);
      tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4);
      tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5);
      tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5);
      tessellator.draw();
    }

    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
  }
  @Override
  public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    RenderBlocks renderer = (RenderBlocks) data[0];
    int metadata = item.getItemDamage();
    GL11.glPushMatrix();
    renderer.setOverrideBlockTexture(PillarMaterials.values()[metadata].block.getIcon(0, 0));
    Tessellator tessellator = Tessellator.instance;
    renderer.setRenderBoundsFromBlock(this.bl);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    tessellator.startDrawingQuads();
    tessellator.setNormal(0.0F, 0.0F, -1.0F);
    renderer.renderFaceZNeg(this.bl, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSide(this.bl, 0));
    tessellator.draw();

    tessellator.startDrawingQuads();
    tessellator.setNormal(0.0F, 0.0F, 1.0F);
    renderer.renderFaceZPos(this.bl, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSide(this.bl, 0));
    tessellator.draw();

    renderer.clearOverrideBlockTexture();
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    GL11.glPushMatrix();
    GL11.glRotatef(180, 0F, 1F, 0F);
    Minecraft.getMinecraft().renderEngine.bindTexture(this.textureFrame);
    this.modelFrame.renderAll();
    GL11.glPopMatrix();

    GL11.glPopMatrix();
  }
  private void doRender(
      TileEntity tileEntity, double x, double y, double z, float partialTickTime) {
    this.bindTexture(resource);

    /*
     * 回転用の角度, tick毎に更新される.
     * なお, インベントリ内部では回転しない.
     */
    float rot = 0.0F;

    if (tileEntity.getWorldObj() != null) {
      rot = tileEntity.getWorldObj().getWorldTime() % 360L;
    }

    GL11.glPushMatrix();
    /*
     * 位置の調整と色の設定.
     */
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);

    GL11.glRotatef(-180F, 1.0F, 0.0F, 0.0F);
    GL11.glTranslatef(0.0F, -0.75F, 0.0F);

    /*
     * Y軸を回転させる処理.
     */
    GL11.glRotatef(rot, 0.0F, 1.0F, 0.0F);

    modelCreeper.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
  }
 public void render(float f) {
   if (field_1402_i) {
     return;
   }
   if (!showModel) {
     return;
   }
   if (!compiled) {
     compileDisplayList(f);
   }
   if (rotateAngleX != 0.0F || rotateAngleY != 0.0F || rotateAngleZ != 0.0F) {
     GL11.glPushMatrix();
     GL11.glTranslatef(offsetX * f, offsetY * f, offsetZ * f);
     if (rotateAngleZ != 0.0F) {
       GL11.glRotatef(rotateAngleZ * 57.29578F, 0.0F, 0.0F, 1.0F);
     }
     if (rotateAngleY != 0.0F) {
       GL11.glRotatef(rotateAngleY * 57.29578F, 0.0F, 1.0F, 0.0F);
     }
     if (rotateAngleX != 0.0F) {
       GL11.glRotatef(rotateAngleX * 57.29578F, 1.0F, 0.0F, 0.0F);
     }
     GL11.glCallList(displayList);
     GL11.glPopMatrix();
   } else if (offsetX != 0.0F || offsetY != 0.0F || offsetZ != 0.0F) {
     GL11.glTranslatef(offsetX * f, offsetY * f, offsetZ * f);
     GL11.glCallList(displayList);
     GL11.glTranslatef(-offsetX * f, -offsetY * f, -offsetZ * f);
   } else {
     GL11.glCallList(displayList);
   }
 }
 public void postRender(float f) {
   if (field_1402_i) {
     return;
   }
   if (!showModel) {
     return;
   }
   if (!compiled) {
     compileDisplayList(f);
   }
   if (rotateAngleX != 0.0F || rotateAngleY != 0.0F || rotateAngleZ != 0.0F) {
     GL11.glTranslatef(offsetX * f, offsetY * f, offsetZ * f);
     if (rotateAngleZ != 0.0F) {
       GL11.glRotatef(rotateAngleZ * 57.29578F, 0.0F, 0.0F, 1.0F);
     }
     if (rotateAngleY != 0.0F) {
       GL11.glRotatef(rotateAngleY * 57.29578F, 0.0F, 1.0F, 0.0F);
     }
     if (rotateAngleX != 0.0F) {
       GL11.glRotatef(rotateAngleX * 57.29578F, 1.0F, 0.0F, 0.0F);
     }
   } else if (offsetX != 0.0F || offsetY != 0.0F || offsetZ != 0.0F) {
     GL11.glTranslatef(offsetX * f, offsetY * f, offsetZ * f);
   }
 }
  public void render(
      Entity p_78088_1_,
      float p_78088_2_,
      float p_78088_3_,
      float p_78088_4_,
      float p_78088_5_,
      float p_78088_6_,
      float p_78088_7_) {
    this.setRotationAngles(
        p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_);

    if (this.isChild) {
      float f6 = 2.0F;
      GL11.glPushMatrix();
      GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
      GL11.glTranslatef(0.0F, 16.0F * p_78088_7_, 0.0F);
      this.bipedHat1.render(p_78088_7_);
      GL11.glPopMatrix();
      GL11.glPushMatrix();
      GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
      GL11.glTranslatef(0.0F, 16.0F * p_78088_7_, 0.0F);
      this.bipedHat2.render(p_78088_7_);
      GL11.glPopMatrix();

    } else {
      this.bipedHat1.render(p_78088_7_);
      this.bipedHat2.render(p_78088_7_);
    }
  }
  public void drawTopLayer(int centerX, int centerY) {
    for (int as = lowerBound; as < upperBound; as++) {
      int pX = as;
      for (int aa = lowerBound; aa < upperBound; aa++) {
        if (aa * aa + as * as > upperBound * upperBound) {
          continue; // confine radar to a circle using pythagorean theorem
        }
        int pZ = aa;

        int bX = (int) (mc.thePlayer.posX + pX); // block posX
        int bZ = (int) (mc.thePlayer.posZ + pZ); // block posZ
        int bY =
            mc.theWorld.getHeightValue(bX, bZ) - 1; // formatted block posY (-1 for compensation)

        int bI = mc.theWorld.getBlockId(bX, bY, bZ); // block id

        double d =
            MathHelper.clamp_float(
                mc.theWorld.getWorldChunkManager().getBiomeGenAt(bX, bY).getFloatTemperature(),
                0.0F,
                1.0F); // biome info
        double d1 =
            MathHelper.clamp_float(
                mc.theWorld.getWorldChunkManager().getBiomeGenAt(bX, bY).getFloatRainfall(),
                0.0F,
                1.0F); // biome info

        int k8 = Block.blocksList[bI].blockIndexInTexture; // block position in texture

        mc.renderEngine.bindTexture(
            mc.renderEngine.getTexture("/terrain.png")); // binding terrain texture

        GL11.glTranslatef(
            0.5F, 0.5F, 0F); // compensating for integer restrictions of Minecraft methods
        if (bI == 2) {
          // g.drawRect(-pX - 1,-pZ - 1,-pX,-pZ, ColorizerGrass.getGrassColor(d, d1));

          colorBasedOnMultiplier(ColorizerGrass.getGrassColor(d, d1));
          g.drawTexturedModalRect(-pX - 1, -pZ - 1, k8 % 16 << 4, (k8 >> 4) << 4, 1, 1);
        } else if (bI == 18) {
          // g.drawRect(-pX - 1,-pZ - 1,-pX,-pZ, ColorizerFoliage.getFoliageColor(d, d1));

          colorBasedOnMultiplier(ColorizerFoliage.getFoliageColor(d, d1));
          g.drawTexturedModalRect(-pX - 1, -pZ - 1, k8 % 16 << 4, (k8 >> 4) << 4, 1, 1);
        } else if (bI == 8 || bI == 9) {
          // g.drawRect(-pX - 1,-pZ - 1,-pX,-pZ,
          // mc.theWorld.getWorldChunkManager().getBiomeGenAt(bX, bZ).waterColorMultiplier *
          // 0xffffffff);
          // g.drawRect(-pX - 1,-pZ - 1,-pX,-pZ, 0xff000fff);

          colorBasedOnMultiplier(0xff000fff);
          g.drawTexturedModalRect(-pX - 1, -pZ - 1, k8 % 16 << 4, (k8 >> 4) << 4, 1, 1);
        } else {
          GL11.glColor4f(255, 255, 255, 255);
          g.drawTexturedModalRect(-pX - 1, -pZ - 1, k8 % 16 << 4, (k8 >> 4) << 4, 1, 1);
        }
        GL11.glTranslatef(-0.5F, -0.5F, 0F);
      }
    }
  }
Exemple #20
0
 private void renderInInventory(
     Tessellator tessellator, RenderBlocks renderer, Block block, int metadata) {
   GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, -1F, 0.0F);
   renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, 1.0F, 0.0F);
   renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, 0.0F, -1F);
   renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, 0.0F, 1.0F);
   renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(-1F, 0.0F, 0.0F);
   renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(1.0F, 0.0F, 0.0F);
   renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
   tessellator.draw();
   GL11.glTranslatef(0.5F, 0.5F, 0.5F);
 }
Exemple #21
0
  /** Sets the models various rotation angles then renders the model. */
  public void render(
      Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
    this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);

    if (this.isChild) {
      float var8 = 2.0F;
      GL11.glPushMatrix();
      GL11.glScalef(1.5F / var8, 1.5F / var8, 1.5F / var8);
      GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F);
      this.bipedHead.render(par7);
      GL11.glPopMatrix();
      GL11.glPushMatrix();
      GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
      GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
      this.bipedBody.render(par7);
      this.bipedRightArm.render(par7);
      this.bipedLeftArm.render(par7);
      this.bipedRightLeg.render(par7);
      this.bipedLeftLeg.render(par7);
      this.bipedHeadwear.render(par7);
      GL11.glPopMatrix();
    } else {
      this.bipedHead.render(par7);
      this.bipedBody.render(par7);
      this.bipedRightArm.render(par7);
      this.bipedLeftArm.render(par7);
      this.bipedRightLeg.render(par7);
      this.bipedLeftLeg.render(par7);
      this.bipedHeadwear.render(par7);
    }
  }
 private void renderStandardBlock(Block block, int meta, RenderBlocks renderer) {
   Tessellator tessellator = Tessellator.instance;
   GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, -1.0F, 0.0F);
   renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, 1.0F, 0.0F);
   renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, 0.0F, -1.0F);
   renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(0.0F, 0.0F, 1.0F);
   renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(-1.0F, 0.0F, 0.0F);
   renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
   tessellator.draw();
   tessellator.startDrawingQuads();
   tessellator.setNormal(1.0F, 0.0F, 0.0F);
   renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
   tessellator.draw();
   GL11.glTranslatef(0.5F, 0.5F, 0.5F);
 }
  public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
    this.func_73986_b(p_73863_1_, p_73863_2_, p_73863_3_);
    Tessellator var4 = Tessellator.field_78398_a;
    short var5 = 274;
    int var6 = this.field_73880_f / 2 - var5 / 2;
    int var7 = this.field_73881_g + 50;
    float var8 = -((float) this.field_73990_a + p_73863_3_) * this.field_73987_d;
    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, var8, 0.0F);
    this.field_73882_e.func_110434_K().func_110577_a(field_110362_a);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.func_73729_b(var6, var7, 0, 0, 155, 44);
    this.func_73729_b(var6 + 155, var7, 0, 45, 155, 44);
    var4.func_78378_d(16777215);
    int var9 = var7 + 200;

    int var10;
    for (var10 = 0; var10 < this.field_73988_b.size(); ++var10) {
      if (var10 == this.field_73988_b.size() - 1) {
        float var11 = (float) var9 + var8 - (float) (this.field_73881_g / 2 - 6);
        if (var11 < 0.0F) {
          GL11.glTranslatef(0.0F, -var11, 0.0F);
        }
      }

      if ((float) var9 + var8 + 12.0F + 8.0F > 0.0F
          && (float) var9 + var8 < (float) this.field_73881_g) {
        String var12 = (String) this.field_73988_b.get(var10);
        if (var12.startsWith("[C]")) {
          this.field_73886_k.func_78261_a(
              var12.substring(3),
              var6 + (var5 - this.field_73886_k.func_78256_a(var12.substring(3))) / 2,
              var9,
              16777215);
        } else {
          this.field_73886_k.field_78289_c.setSeed(
              (long) var10 * 4238972211L + (long) (this.field_73990_a / 4));
          this.field_73886_k.func_78261_a(var12, var6, var9, 16777215);
        }
      }

      var9 += 12;
    }

    GL11.glPopMatrix();
    this.field_73882_e.func_110434_K().func_110577_a(field_110361_b);
    GL11.glEnable(3042);
    GL11.glBlendFunc(0, 769);
    var4.func_78382_b();
    var4.func_78369_a(1.0F, 1.0F, 1.0F, 1.0F);
    var10 = this.field_73880_f;
    int var13 = this.field_73881_g;
    var4.func_78374_a(0.0D, (double) var13, (double) this.field_73735_i, 0.0D, 1.0D);
    var4.func_78374_a((double) var10, (double) var13, (double) this.field_73735_i, 1.0D, 1.0D);
    var4.func_78374_a((double) var10, 0.0D, (double) this.field_73735_i, 1.0D, 0.0D);
    var4.func_78374_a(0.0D, 0.0D, (double) this.field_73735_i, 0.0D, 0.0D);
    var4.func_78381_a();
    GL11.glDisable(3042);
    super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
  }
  public void transform(ItemRenderType type) {
    if (type == ItemRenderType.EQUIPPED) {
      GL11.glTranslatef(0.5F, 0.5F, 0.5F);
      GL11.glRotatef(185, 1, 0, 0);
      GL11.glRotatef(40, 0, 1, 0);
      GL11.glRotatef(-70, 0, 0, 1);
      GL11.glScalef(3.2F, 3.2F, 3.2F);
    }

    if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
      GL11.glScalef(8.2F, 8.2F, 8.2F);
      GL11.glTranslatef(0.291F, -0.15F, 0.1F);
      GL11.glRotatef(180, 0, 0, 1);
    }

    GL11.glScalef(-0.4F, -0.4F, 0.4F);

    if (type == ItemRenderType.INVENTORY || type == ItemRenderType.ENTITY) {
      if (type == ItemRenderType.INVENTORY) {
        GL11.glTranslatef(0.0F, 1.45F, 0.0F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        GL11.glRotatef(180, 0, 0, 1);
        GL11.glRotatef(180, 0, 1, 0);
      } else {
        GL11.glRotatef(Sys.getTime() / 90F % 360F, 0F, 1F, 0F);
        GL11.glScalef(2F, -2F, 2F);
      }

      GL11.glScalef(1.3F, 1.3F, 1.3F);
    }
  }
 public void drawPlayerOnGui(
     Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5) {
   final float pitchBefore = par0Minecraft.thePlayer.rotationPitch;
   GL11.glEnable(GL11.GL_COLOR_MATERIAL);
   GL11.glPushMatrix();
   GL11.glTranslatef(par1, par2, 50.0F);
   GL11.glScalef(-par3, par3, par3);
   GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
   final float var6 = par0Minecraft.thePlayer.renderYawOffset;
   final float var7 = par0Minecraft.thePlayer.rotationYaw;
   final float var8 = par0Minecraft.thePlayer.rotationPitch;
   GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
   RenderHelper.enableStandardItemLighting();
   GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
   GL11.glRotatef(-((float) Math.atan(this.rotation / 40.0F)) * 00.0F, 1.0F, 0.0F, 0.0F);
   par0Minecraft.thePlayer.renderYawOffset = this.rotation;
   par0Minecraft.thePlayer.rotationYaw = this.rotation;
   par0Minecraft.thePlayer.rotationPitch = 0;
   par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
   GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
   RenderManager.instance.playerViewY = 180.0F;
   RenderManager.instance.renderEntityWithPosYaw(
       par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
   par0Minecraft.thePlayer.renderYawOffset = var6;
   par0Minecraft.thePlayer.rotationYaw = var7;
   //        par0Minecraft.thePlayer.rotationPitch = var8;
   GL11.glPopMatrix();
   RenderHelper.disableStandardItemLighting();
   GL11.glDisable(GL12.GL_RESCALE_NORMAL);
   OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
   GL11.glDisable(GL11.GL_TEXTURE_2D);
   OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
   par0Minecraft.thePlayer.rotationPitch = pitchBefore;
 }
Exemple #26
0
  public void renderLoop() {
    angle += 2.0f;

    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glPushMatrix();
    glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
    glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
    glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);

    glPushMatrix();
    glTranslatef(-3.0f, -2.0f, 0.0f);
    glRotatef(angle, 0.0f, 0.0f, 1.0f);
    glCallList(gear1);
    glPopMatrix();

    glPushMatrix();
    glTranslatef(3.1f, -2.0f, 0.0f);
    glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
    glCallList(gear2);
    glPopMatrix();

    glPushMatrix();
    glTranslatef(-3.1f, 4.2f, 0.0f);
    glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
    glCallList(gear3);
    glPopMatrix();

    glPopMatrix();
  }
  @Optional.Method(modid = Mods.OpenComputers)
  public void render(ItemStack stack, MountPoint mountPoint, Robot robot, float pt) {
    if (!isUpgrade(stack)) {
      return;
    }

    Minecraft mc = Minecraft.getMinecraft();
    TextureManager tm = mc.getTextureManager();

    switch (stack.getItemDamage()) {
      case 1:
        {
          tm.bindTexture(upgradeChatBox);
          drawSimpleBlock(mountPoint, 0, true);
          break;
        }
      case 2:
        {
          if (mountPoint.name.equals(MountPointName.TopLeft)
              || mountPoint.name.equals(MountPointName.TopRight)) {
            float degrees =
                robot.shouldAnimate()
                    ? ((robot.world().getTotalWorldTime() + (robot.hashCode() ^ 0xFF)) % 160 + pt)
                        / 160F
                        * 360F
                    : 0F;
            if (mountPoint.name.equals(MountPointName.TopRight)) {
              degrees = 360 - degrees;
            }
            GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
            tm.bindTexture(modelRadar);
            GL11.glDisable(GL11.GL_CULL_FACE);
            GL11.glRotatef(180, 1, 0, 0);
            GL11.glRotatef(
                mountPoint.rotation.getW(),
                mountPoint.rotation.getX(),
                mountPoint.rotation.getY(),
                mountPoint.rotation.getZ());
            GL11.glTranslatef(0F, -0.8F, 0F);
            GL11.glTranslatef(
                mountPoint.offset.getX(), mountPoint.offset.getY(), mountPoint.offset.getZ());
            GL11.glScalef(0.3f, 0.3f, 0.3f);
            GL11.glPushMatrix();
            radarModel.render(Math.max(degrees, 0));
            GL11.glPopMatrix();
            GL11.glPopAttrib();
          } else {
            tm.bindTexture(upgradeRadar);
            drawSimpleBlock(mountPoint, 0, true);
          }
          break;
        }
      case 5:
        {
          tm.bindTexture(beepCard);
          drawSimpleBlock(mountPoint, 0, true);
          break;
        }
    }
  }
  /** Sets the models various rotation angles then renders the model. */
  public void render(
      Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
    this.setRotationAngles(par2, par3, par4, par5, par6, par7);

    if (this.isChild) {
      float var8 = 2.0F;
      GL11.glPushMatrix();
      GL11.glScalef(1.5F / var8, 1.5F / var8, 1.5F / var8);
      GL11.glTranslatef(0.0F, 10.0F * par7, 4.0F * par7);
      this.field_48220_g.render(par7);
      GL11.glPopMatrix();
      GL11.glPushMatrix();
      GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
      GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
      this.field_48226_n.render(par7);
      this.field_48225_a.render(par7);
      this.field_48223_b.render(par7);
      this.field_48224_c.render(par7);
      this.field_48221_d.render(par7);
      this.field_48222_e.render(par7);
      this.field_48219_f.render(par7);
      GL11.glPopMatrix();
    } else {
      this.field_48220_g.render(par7);
      this.field_48226_n.render(par7);
      this.field_48222_e.render(par7);
      this.field_48219_f.render(par7);
      this.field_48225_a.render(par7);
      this.field_48223_b.render(par7);
      this.field_48224_c.render(par7);
      this.field_48221_d.render(par7);
    }
  }
Exemple #29
0
 public static void renderInvBlock(Block block, int m, RenderBlocks renderer) {
   Tessellator var14 = Tessellator.instance;
   GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
   var14.startDrawingQuads();
   var14.setNormal(0.0F, -1.0F, 0.0F);
   renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, m));
   var14.draw();
   var14.startDrawingQuads();
   var14.setNormal(0.0F, 1.0F, 0.0F);
   renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, m));
   var14.draw();
   var14.startDrawingQuads();
   var14.setNormal(0.0F, 0.0F, -1.0F);
   renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, m));
   var14.draw();
   var14.startDrawingQuads();
   var14.setNormal(0.0F, 0.0F, 1.0F);
   renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, m));
   var14.draw();
   var14.startDrawingQuads();
   var14.setNormal(-1.0F, 0.0F, 0.0F);
   renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, m));
   var14.draw();
   var14.startDrawingQuads();
   var14.setNormal(1.0F, 0.0F, 0.0F);
   renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, m));
   var14.draw();
   GL11.glTranslatef(0.5F, 0.5F, 0.5F);
 }
  public void renderSides(TileEntity tileEntity) {
    Tessellator tes = Tessellator.instance;

    this.bindTexture(textureSide);

    GL11.glTranslatef(0.5f, 0.5f, 0.5f);

    // draw all sides
    // NORTH
    renderSidesPartial();
    GL11.glRotatef(-90, 0, 1, 0);
    // EAST
    renderSidesPartial();
    GL11.glRotatef(-90, 0, 1, 0);
    // SOUTH
    renderSidesPartial();
    GL11.glRotatef(-90, 0, 1, 0);
    // WEST
    renderSidesPartial();
    GL11.glRotatef(270, 0, 1, 0);

    // TOP
    GL11.glRotatef(-90, 1, 0, 0);
    renderSidesPartial();
    // DRAW BOTTOM
    GL11.glRotatef(180, 1, 0, 0);
    renderSidesPartial();
    // Reset rotation
    GL11.glRotatef(-180, 1, 0, 0);
    GL11.glRotatef(90, 1, 0, 0);

    // undo translate
    GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
  }