Package com.mojang.minecraft.render

Examples of com.mojang.minecraft.render.TextureManager


   }

   public final void render(float var1, boolean var2, int var3, int var4) {
      FontRenderer var5 = this.mc.fontRenderer;
      this.mc.renderer.enableGuiMode();
      TextureManager var6 = this.mc.textureManager;
      GL11.glBindTexture(3553, this.mc.textureManager.load("/gui/gui.png"));
      ShapeRenderer var7 = ShapeRenderer.instance;
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glEnable(3042);
      Inventory var8 = this.mc.player.inventory;
      this.imgZ = -90.0F;
      this.drawImage(this.width / 2 - 91, this.height - 22, 0, 0, 182, 22);
      this.drawImage(this.width / 2 - 91 - 1 + var8.selected * 20, this.height - 22 - 1, 0, 22, 24, 22);
      GL11.glBindTexture(3553, this.mc.textureManager.load("/gui/icons.png"));
      this.drawImage(this.width / 2 - 7, this.height / 2 - 7, 0, 0, 16, 16);
      boolean var9 = this.mc.player.invulnerableTime / 3 % 2 == 1;
      if(this.mc.player.invulnerableTime < 10) {
         var9 = false;
      }

      int var10 = this.mc.player.health;
      int var11 = this.mc.player.lastHealth;
      this.random.setSeed((long)(this.ticks * 312871));
      int var12;
      int var14;
      int var15;
      int var26;
      if(this.mc.gamemode.isSurvival()) {
         for(var12 = 0; var12 < 10; ++var12) {
            byte var13 = 0;
            if(var9) {
               var13 = 1;
            }

            var14 = this.width / 2 - 91 + (var12 << 3);
            var15 = this.height - 32;
            if(var10 <= 4) {
               var15 += this.random.nextInt(2);
            }

            this.drawImage(var14, var15, 16 + var13 * 9, 0, 9, 9);
            if(var9) {
               if((var12 << 1) + 1 < var11) {
                  this.drawImage(var14, var15, 70, 0, 9, 9);
               }

               if((var12 << 1) + 1 == var11) {
                  this.drawImage(var14, var15, 79, 0, 9, 9);
               }
            }

            if((var12 << 1) + 1 < var10) {
               this.drawImage(var14, var15, 52, 0, 9, 9);
            }

            if((var12 << 1) + 1 == var10) {
               this.drawImage(var14, var15, 61, 0, 9, 9);
            }
         }

         if(this.mc.player.isUnderWater()) {
            var12 = (int)Math.ceil((double)(this.mc.player.airSupply - 2) * 10.0D / 300.0D);
            var26 = (int)Math.ceil((double)this.mc.player.airSupply * 10.0D / 300.0D) - var12;

            for(var14 = 0; var14 < var12 + var26; ++var14) {
               if(var14 < var12) {
                  this.drawImage(this.width / 2 - 91 + (var14 << 3), this.height - 32 - 9, 16, 18, 9, 9);
               } else {
                  this.drawImage(this.width / 2 - 91 + (var14 << 3), this.height - 32 - 9, 25, 18, 9, 9);
               }
            }
         }
      }

      GL11.glDisable(3042);

      String var23;
      for(var12 = 0; var12 < var8.slots.length; ++var12) {
         var26 = this.width / 2 - 90 + var12 * 20;
         var14 = this.height - 16;
         if((var15 = var8.slots[var12]) > 0) {
            GL11.glPushMatrix();
            GL11.glTranslatef((float)var26, (float)var14, -50.0F);
            if(var8.popTime[var12] > 0) {
               float var18;
               float var21 = -MathHelper.sin((var18 = ((float)var8.popTime[var12] - var1) / 5.0F) * var18 * 3.1415927F) * 8.0F;
               float var19 = MathHelper.sin(var18 * var18 * 3.1415927F) + 1.0F;
               float var16 = MathHelper.sin(var18 * 3.1415927F) + 1.0F;
               GL11.glTranslatef(10.0F, var21 + 10.0F, 0.0F);
               GL11.glScalef(var19, var16, 1.0F);
               GL11.glTranslatef(-10.0F, -10.0F, 0.0F);
            }

            GL11.glScalef(10.0F, 10.0F, 10.0F);
            GL11.glTranslatef(1.0F, 0.5F, 0.0F);
            GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, 0.5F, 0.5F);
            GL11.glScalef(-1.0F, -1.0F, -1.0F);
            int var20 = var6.load("/terrain.png");
            GL11.glBindTexture(3553, var20);
            var7.begin();
            Block.blocks[var15].renderFullbright(var7);
            var7.end();
            GL11.glPopMatrix();
View Full Code Here


    if(setting == 6)
    {
      anaglyph = !anaglyph;

      TextureManager textureManager = minecraft.textureManager;
      Iterator iterator = this.minecraft.textureManager.textureImages.keySet().iterator();

      int i;
      BufferedImage image;

      while(iterator.hasNext())
      {
        i = (Integer)iterator.next();
        image = (BufferedImage)textureManager.textureImages.get(Integer.valueOf(i));

        textureManager.load(image, i);
      }

      iterator = textureManager.textures.keySet().iterator();

      while(iterator.hasNext())
      {
        String s = (String)iterator.next();

        try
        {
          if(s.startsWith("##"))
          {
            image = TextureManager.load1(ImageIO.read(TextureManager.class.getResourceAsStream(s.substring(2))));
          } else {
            image = ImageIO.read(TextureManager.class.getResourceAsStream(s));
          }

          i = (Integer)textureManager.textures.get(s);

          textureManager.load(image, i);
        } catch (IOException var6) {
          var6.printStackTrace();
        }
      }
    }
View Full Code Here

         int var3 = this.height / 2 + var1 / 9 * 24 + -60;
         drawFadingBox(var2 - 3, var3 - 8, var2 + 23, var3 + 24 - 6, -1862270977, -1056964609);
      }

      drawCenteredString(this.fontRenderer, "Select block", this.width / 2, 40, 16777215);
      TextureManager var7 = this.minecraft.textureManager;
      ShapeRenderer var8 = ShapeRenderer.instance;
      var2 = var7.load("/terrain.png");
      GL11.glBindTexture(3553, var2);

      for(var2 = 0; var2 < SessionData.allowedBlocks.size(); ++var2) {
         Block var4 = (Block)SessionData.allowedBlocks.get(var2);
         GL11.glPushMatrix();
View Full Code Here

      this.moveQueue.add(new PositionUpdate(var1, var2));
   }

   public void clear() {
      if(this.a >= 0 && this.textures != null) {
         TextureManager var10000 = this.textures;
         int var1 = this.a;
         TextureManager var2 = this.textures;
         var10000.textureImages.remove(Integer.valueOf(var1));
         var2.idBuffer.clear();
         var2.idBuffer.put(var1);
         var2.idBuffer.flip();
         GL11.glDeleteTextures(var2.idBuffer);
View Full Code Here

TOP

Related Classes of com.mojang.minecraft.render.TextureManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.