public void drawScreen(int i, int i1, float f) {

    drawDefaultBackground();
    super.drawScreen(i, i1, f);
    drawCenteredString(
        fontRenderer, mypixelmon.getName() + "can no longer fight", width / 2, 10, 0xFFFFFF);
  }
Ejemplo n.º 2
0
 public void drawScreen(int x, int y, float z) {
   synchronized (serverInfo) {
     this.worldSlotContainer.drawScreen(x, y, z);
     this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);
     this.drawCenteredString(
         this.fontRenderer,
         "Spoutcraft Server Browser",
         this.width / 2,
         this.height - 86,
         5263440);
     this.drawCenteredString(
         this.fontRenderer, indexString, this.width / 2, this.height - 71, 5263440);
     this.drawString(
         this.fontRenderer,
         "Displaying " + this.serverInfo.serverList.size() + " servers",
         this.width
             - this.fontRenderer.getStringWidth(
                 "Displaying " + this.serverInfo.serverList.size() + " servers")
             - 2,
         20,
         5263440);
     this.drawString(this.fontRenderer, "Status: " + this.serverInfo.status, 2, 20, 5263440);
   }
   super.drawScreen(x, y, z);
 }
 public void drawScreen(int i, int j, float f) {
   drawDefaultBackground();
   drawCenteredString(
       fontRenderer, "Level save conflict", width / 2, (height / 4 - 60) + 20, 0xffffff);
   drawString(
       fontRenderer,
       "Minecraft detected a conflict in the level save data.",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 0,
       0xa0a0a0);
   drawString(
       fontRenderer,
       "This could be caused by two copies of the game",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 18,
       0xa0a0a0);
   drawString(
       fontRenderer,
       "accessing the same level.",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 27,
       0xa0a0a0);
   drawString(
       fontRenderer,
       "To prevent level corruption, the current game has quit.",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 45,
       0xa0a0a0);
   super.drawScreen(i, j, f);
 }
Ejemplo n.º 4
0
 @Override
 public void drawScreen(int par2, int par3, float par4) {
   this.drawDefaultBackground();
   Frame[] frames = guiManager.getFrames();
   for (int i = frames.length - 1; i >= 0; i--) frames[i].render();
   super.drawScreen(par2, par3, par4);
 }
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   StringTranslate var4 = StringTranslate.getInstance();
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.title"),
       this.width / 2,
       17,
       16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.start"),
       this.width / 2 - 100,
       53,
       10526880);
   this.drawString(this.fontRenderer, this.field_98069_o, this.width / 2 - 100, 66, 16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.daysleft"),
       this.width / 2 - 100,
       85,
       10526880);
   this.drawString(
       this.fontRenderer, String.valueOf(this.field_98068_n), this.width / 2 - 100, 98, 16777215);
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 6
0
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    drawDefaultBackground();
    // Draw label at top of screen
    drawCenteredString(fontRenderer, "Overlay settings", width / 2, height / 2 - 80 - 20, 0x4444bb);

    // Draw buttons
    super.drawScreen(par1, par2, par3);
  }
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.renderSkybox(par1, par2, par3);
    Tessellator var4 = Tessellator.instance;
    short var5 = 274;
    int var6 = this.width / 2 - var5 / 2;
    byte var7 = 30;
    this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
    this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/title/mclogo.png"));
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    if ((double) this.updateCounter < 1.0E-4D) {
      this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 99, 44);
      this.drawTexturedModalRect(var6 + 99, var7 + 0, 129, 0, 27, 44);
      this.drawTexturedModalRect(var6 + 99 + 26, var7 + 0, 126, 0, 3, 44);
      this.drawTexturedModalRect(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
      this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
    } else {
      this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 155, 44);
      this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
    }

    var4.setColorOpaque_I(16777215);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
    GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
    float var8 =
        1.8F
            - MathHelper.abs(
                MathHelper.sin(
                        (float) (Minecraft.getSystemTime() % 1000L)
                            / 1000.0F
                            * (float) Math.PI
                            * 2.0F)
                    * 0.1F);
    var8 = var8 * 100.0F / (float) (this.fontRenderer.getStringWidth(this.splashText) + 32);
    GL11.glScalef(var8, var8, var8);
    this.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
    GL11.glPopMatrix();
    String var9 = "Minecraft 1.3.2";

    if (this.mc.isDemo()) {
      var9 = var9 + " Demo";
    }

    this.drawString(this.fontRenderer, var9, 2, this.height - 10, 16777215);
    String var10 = "Copyright Mojang AB. Ported by Nick Parker";
    this.drawString(
        this.fontRenderer,
        var10,
        this.width - this.fontRenderer.getStringWidth(var10) - 2,
        this.height - 10,
        16777215);
    super.drawScreen(par1, par2, par3);
  }
Ejemplo n.º 8
0
 public void drawScreen(int var1, int var2, float var3) {
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer, this.errorMessage, this.width / 2, this.height / 2 - 50, 16777215);
   this.drawCenteredString(
       this.fontRenderer, this.errorDetail, this.width / 2, this.height / 2 - 10, 16777215);
   super.drawScreen(var1, var2, var3);
   // Spout Start
   ReconnectManager.teleport(this.mc);
   // Spout End
 }
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    super.drawScreen(par1, par2, par3);
    drawDefaultBackground();
    drawGuiContainerBackgroundLayer(par3, par1, par2);
    drawGuiContainerForegroundLayer();

    for (int i = 0; i < controlList.size(); i++) {
      GuiButton guibutton = (GuiButton) controlList.get(i);
      guibutton.drawButton(mc, par1, par2);
    }
  }
Ejemplo n.º 10
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer, I18n.func_135053_a("selectServer.direct"), this.width / 2, 20, 16777215);
   this.drawString(
       this.fontRenderer,
       I18n.func_135053_a("addServer.enterIp"),
       this.width / 2 - 100,
       100,
       10526880);
   this.serverTextField.drawTextBox();
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 11
0
  public void drawScreen(int i, int j, float f) {
    drawDefaultBackground();
    drawCenteredString(fontRenderer, screenTitle, width / 2, 20, 0xffffff);
    int k = func_20080_j();
    for (int l = 0; l < options.keyBindings.length; l++) {
      drawString(
          fontRenderer,
          options.getKeyBindingDescription(l),
          k + (l % 2) * 160 + 70 + 6,
          height / 6 + 24 * (l >> 1) + 7,
          -1);
    }

    super.drawScreen(i, j, f);
  }
Ejemplo n.º 12
0
 @Override
 public void drawScreen(int i, int j, float f) {
   drawRect(2, height - 14, width - 2, height - 2, 0x88000088);
   drawString(
       fontRenderer,
       (new StringBuilder())
           .append("> ")
           .append(message)
           .append(((updateCounter / 6) % 2) != 0 ? "" : "_")
           .toString(),
       4,
       height - 12,
       0xe0e0e0);
   super.drawScreen(i, j, f);
 }
Ejemplo n.º 13
0
 public void drawScreen(int i, int j, float f) {
   guiTexturePackSlot.drawScreen(i, j, f);
   if (field_6454_o <= 0) {
     mc.texturePackList.updateAvaliableTexturePacks();
     field_6454_o += 20;
   }
   StringTranslate stringtranslate = StringTranslate.getInstance();
   drawCenteredString(
       fontRenderer, stringtranslate.translateKey("texturePack.title"), width / 2, 16, 0xffffff);
   drawCenteredString(
       fontRenderer,
       stringtranslate.translateKey("texturePack.folderInfo"),
       width / 2 - 77,
       height - 26,
       0x808080);
   super.drawScreen(i, j, f);
 }
Ejemplo n.º 14
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   StringTranslate var4 = StringTranslate.getInstance();
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer,
       var4.translateKey("selectServer.direct"),
       this.width / 2,
       this.height / 4 - 60 + 20,
       16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("addServer.enterIp"),
       this.width / 2 - 100,
       100,
       10526880);
   this.serverTextField.drawTextBox();
   super.drawScreen(par1, par2, par3);
 }
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.field_110346_c.drawScreen(par1, par2, par3);

    if (this.refreshTimer <= 0) {
      GuiScreenTemporaryResourcePackSelectSelectionList.func_110510_a(this.field_110346_c)
          .func_110611_a();
      this.refreshTimer = 20;
    }

    this.drawCenteredString(
        this.fontRenderer, I18n.func_135053_a("resourcePack.title"), this.width / 2, 16, 16777215);
    this.drawCenteredString(
        this.fontRenderer,
        I18n.func_135053_a("resourcePack.folderInfo"),
        this.width / 2 - 77,
        this.height - 26,
        8421504);
    super.drawScreen(par1, par2, par3);
  }
Ejemplo n.º 16
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.drawDefaultBackground();
    this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 40, 16777215);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) (this.width / 2), 0.0F, 50.0F);
    float var4 = 93.75F;
    GL11.glScalef(-var4, -var4, -var4);
    GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
    Block var5 = this.entitySign.getBlockType();

    if (var5 == Block.signPost) {
      float var6 = (float) (this.entitySign.getBlockMetadata() * 360) / 16.0F;
      GL11.glRotatef(var6, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
    } else {
      int var8 = this.entitySign.getBlockMetadata();
      float var7 = 0.0F;

      if (var8 == 2) {
        var7 = 180.0F;
      }

      if (var8 == 4) {
        var7 = 90.0F;
      }

      if (var8 == 5) {
        var7 = -90.0F;
      }

      GL11.glRotatef(var7, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
    }

    if (this.updateCounter / 6 % 2 == 0) {
      this.entitySign.lineBeingEdited = this.editLine;
    }

    TileEntityRenderer.instance.renderTileEntityAt(this.entitySign, -0.5D, -0.75D, -0.5D, 0.0F);
    this.entitySign.lineBeingEdited = -1;
    GL11.glPopMatrix();
    super.drawScreen(par1, par2, par3);
  }
Ejemplo n.º 17
0
 public void drawScreen(int i, int j, float f) {
   drawDefaultBackground();
   drawCenteredString(fontRenderer, screenTitle, width / 2, 40, 0xffffff);
   GL11.glPushMatrix();
   GL11.glTranslatef(width / 2, 0.0F, 50F);
   float f1 = 93.75F;
   GL11.glScalef(-f1, -f1, -f1);
   GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
   Block block = entitySign.getBlockType();
   if (block == Block.signPost) {
     float f2 = (float) (entitySign.getBlockMetadata() * 360) / 16F;
     GL11.glRotatef(f2, 0.0F, 1.0F, 0.0F);
     GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
   } else {
     int k = entitySign.getBlockMetadata();
     float f3 = 0.0F;
     if (k == 2) {
       f3 = 180F;
     }
     if (k == 4) {
       f3 = 90F;
     }
     if (k == 5) {
       f3 = -90F;
     }
     GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
     GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
   }
   if ((updateCounter / 6) % 2 == 0) {
     entitySign.lineBeingEdited = editLine;
   }
   TileEntityRenderer.instance.renderTileEntityAt(entitySign, -0.5D, -0.75D, -0.5D, 0.0F);
   entitySign.lineBeingEdited = -1;
   GL11.glPopMatrix();
   super.drawScreen(i, j, f);
 }
Ejemplo n.º 18
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.renderSkybox(par1, par2, par3);
    Tessellator var4 = Tessellator.instance;
    short var5 = 274;
    int var6 = this.width / 2 - var5 / 2;
    byte var7 = 30;
    this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
    this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
    this.mc.renderEngine.func_98187_b("/title/mclogo.png");
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    if ((double) this.updateCounter < 1.0E-4D) {
      this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 99, 44);
      this.drawTexturedModalRect(var6 + 99, var7 + 0, 129, 0, 27, 44);
      this.drawTexturedModalRect(var6 + 99 + 26, var7 + 0, 126, 0, 3, 44);
      this.drawTexturedModalRect(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
      this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
    } else {
      this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 155, 44);
      this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
    }

    var4.setColorOpaque_I(16777215);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
    GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
    float var8 =
        1.8F
            - MathHelper.abs(
                MathHelper.sin(
                        (float) (Minecraft.getSystemTime() % 1000L)
                            / 1000.0F
                            * (float) Math.PI
                            * 2.0F)
                    * 0.1F);
    var8 = var8 * 100.0F / (float) (this.fontRenderer.getStringWidth(this.splashText) + 32);
    GL11.glScalef(var8, var8, var8);
    this.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
    GL11.glPopMatrix();
    String var9 = "Minecraft 1.5";

    if (this.mc.isDemo()) {
      var9 = var9 + " Demo";
    }

    this.drawString(this.fontRenderer, var9, 2, this.height - 10, 16777215);
    String var10 = "Copyright Mojang AB. Do not distribute!";
    this.drawString(
        this.fontRenderer,
        var10,
        this.width - this.fontRenderer.getStringWidth(var10) - 2,
        this.height - 10,
        16777215);

    if (this.field_92025_p != null && this.field_92025_p.length() > 0) {
      drawRect(
          this.field_92022_t - 2,
          this.field_92021_u - 2,
          this.field_92020_v + 2,
          this.field_92019_w - 1,
          1428160512);
      this.drawString(
          this.fontRenderer, this.field_92025_p, this.field_92022_t, this.field_92021_u, 16777215);
      this.drawString(
          this.fontRenderer,
          field_96138_a,
          (this.width - this.field_92024_r) / 2,
          ((GuiButton) this.buttonList.get(0)).yPosition - 12,
          16777215);
    }

    super.drawScreen(par1, par2, par3);
  }
  @Override

  /** Draws the screen and all the components in it. */
  public void drawScreen(int p_571_1_, int p_571_2_, float p_571_3_) {
    this.modList.drawScreen(p_571_1_, p_571_2_, p_571_3_);
    this.drawCenteredString(this.fontRenderer, "Mod List", this.width / 2, 16, 0xFFFFFF);
    int offset = this.listWidth + 20;
    if (selectedMod != null) {
      GL11.glEnable(GL11.GL_BLEND);
      if (!selectedMod.getMetadata().autogenerated) {
        int shifty = 35;
        if (!selectedMod.getMetadata().logoFile.isEmpty()) {
          int texture = this.mc.renderEngine.getTexture(selectedMod.getMetadata().logoFile);
          GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
          this.mc.renderEngine.bindTexture(texture);
          Dimension dim = TextureFXManager.instance().getTextureDimensions(texture);
          int top = 32;
          Tessellator tess = Tessellator.instance;
          tess.startDrawingQuads();
          tess.addVertexWithUV(offset, top + dim.height, zLevel, 0, 1);
          tess.addVertexWithUV(offset + dim.width, top + dim.height, zLevel, 1, 1);
          tess.addVertexWithUV(offset + dim.width, top, zLevel, 1, 0);
          tess.addVertexWithUV(offset, top, zLevel, 0, 0);
          tess.draw();

          shifty += 65;
        }
        this.fontRenderer.drawStringWithShadow(
            selectedMod.getMetadata().name, offset, shifty, 0xFFFFFF);
        shifty += 12;

        shifty =
            drawLine(
                String.format(
                    "Version: %s (%s)",
                    selectedMod.getMetadata().version, selectedMod.getVersion()),
                offset,
                shifty);
        shifty =
            drawLine(
                String.format("Mod State: %s", Loader.instance().getModState(selectedMod)),
                offset,
                shifty);
        if (!selectedMod.getMetadata().credits.isEmpty()) {
          shifty =
              drawLine(
                  String.format("Credits: %s", selectedMod.getMetadata().credits), offset, shifty);
        }
        shifty =
            drawLine(
                String.format("Authors: %s", selectedMod.getMetadata().getAuthorList()),
                offset,
                shifty);
        shifty = drawLine(String.format("URL: %s", selectedMod.getMetadata().url), offset, shifty);
        shifty =
            drawLine(
                selectedMod.getMetadata().childMods.isEmpty()
                    ? "No child mods for this mod"
                    : String.format("Child mods: %s", selectedMod.getMetadata().getChildModList()),
                offset,
                shifty);
        this.getFontRenderer()
            .drawSplitString(
                selectedMod.getMetadata().description,
                offset,
                shifty + 10,
                this.width - offset - 20,
                0xDDDDDD);
      } else {
        offset = (this.listWidth + this.width) / 2;
        this.drawCenteredString(this.fontRenderer, selectedMod.getName(), offset, 35, 0xFFFFFF);
        this.drawCenteredString(
            this.fontRenderer,
            String.format("Version: %s", selectedMod.getVersion()),
            offset,
            45,
            0xFFFFFF);
        this.drawCenteredString(
            this.fontRenderer,
            String.format("Mod State: %s", Loader.instance().getModState(selectedMod)),
            offset,
            55,
            0xFFFFFF);
        this.drawCenteredString(
            this.fontRenderer, "No mod information found", offset, 65, 0xDDDDDD);
        this.drawCenteredString(
            this.fontRenderer,
            "Ask your mod author to provide a mod mcmod.info file",
            offset,
            75,
            0xDDDDDD);
      }
      GL11.glDisable(GL11.GL_BLEND);
    }
    super.drawScreen(p_571_1_, p_571_2_, p_571_3_);
  }
Ejemplo n.º 20
0
 @Override
 public void drawScreen(int par1, int par2, float par3) {
   drawDefaultBackground();
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 21
0
  protected void genAchievementBackground(int par1, int par2, float par3) {
    int i = MathHelper.floor_double(field_27116_m + (guiMapX - field_27116_m) * (double) par3);
    int j = MathHelper.floor_double(field_27115_n + (guiMapY - field_27115_n) * (double) par3);

    if (i < guiMapTop) {
      i = guiMapTop;
    }

    if (j < guiMapLeft) {
      j = guiMapLeft;
    }

    if (i >= guiMapBottom) {
      i = guiMapBottom - 1;
    }

    if (j >= guiMapRight) {
      j = guiMapRight - 1;
    }

    int k = mc.renderEngine.getTexture("/terrain.png");
    int l = mc.renderEngine.getTexture("/achievement/bg.png");
    int i1 = (width - achievementsPaneWidth) / 2;
    int j1 = (height - achievementsPaneHeight) / 2;
    int k1 = i1 + 16;
    int l1 = j1 + 17;
    zLevel = 0.0F;
    GL11.glDepthFunc(GL11.GL_GEQUAL);
    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, 0.0F, -200F);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    mc.renderEngine.bindTexture(k);
    int i2 = i + 288 >> 4;
    int j2 = j + 288 >> 4;
    int k2 = (i + 288) % 16;
    int l2 = (j + 288) % 16;
    Random random = new Random();

    for (int i3 = 0; i3 * 16 - l2 < 155; i3++) {
      float f = 0.6F - ((float) (j2 + i3) / 25F) * 0.3F;
      GL11.glColor4f(f, f, f, 1.0F);

      for (int k3 = 0; k3 * 16 - k2 < 224; k3++) {
        random.setSeed(1234 + i2 + k3);
        random.nextInt();
        int j4 = random.nextInt(1 + j2 + i3) + (j2 + i3) / 2;
        int l4 = Block.sand.blockIndexInTexture;

        if (j4 > 37 || j2 + i3 == 35) {
          l4 = Block.bedrock.blockIndexInTexture;
        } else if (j4 == 22) {
          if (random.nextInt(2) == 0) {
            l4 = Block.oreDiamond.blockIndexInTexture;
          } else {
            l4 = Block.oreRedstone.blockIndexInTexture;
          }
        } else if (j4 == 10) {
          l4 = Block.oreIron.blockIndexInTexture;
        } else if (j4 == 8) {
          l4 = Block.oreCoal.blockIndexInTexture;
        } else if (j4 > 4) {
          l4 = Block.stone.blockIndexInTexture;
        } else if (j4 > 0) {
          l4 = Block.dirt.blockIndexInTexture;
        }

        drawTexturedModalRect(
            (k1 + k3 * 16) - k2, (l1 + i3 * 16) - l2, l4 % 16 << 4, (l4 >> 4) << 4, 16, 16);
      }
    }

    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glDepthFunc(GL11.GL_LEQUAL);
    GL11.glDisable(GL11.GL_TEXTURE_2D);

    for (int j3 = 0; j3 < AchievementList.achievementList.size(); j3++) {
      Achievement achievement1 = (Achievement) AchievementList.achievementList.get(j3);

      if (achievement1.parentAchievement == null) {
        continue;
      }

      int l3 = (achievement1.displayColumn * 24 - i) + 11 + k1;
      int k4 = (achievement1.displayRow * 24 - j) + 11 + l1;
      int i5 = (achievement1.parentAchievement.displayColumn * 24 - i) + 11 + k1;
      int l5 = (achievement1.parentAchievement.displayRow * 24 - j) + 11 + l1;
      boolean flag = statFileWriter.hasAchievementUnlocked(achievement1);
      boolean flag1 = statFileWriter.canUnlockAchievement(achievement1);
      char c =
          Math.sin(((double) (System.currentTimeMillis() % 600L) / 600D) * Math.PI * 2D)
                  <= 0.59999999999999998D
              ? '\202'
              : '\377';
      int i8 = 0xff000000;

      if (flag) {
        i8 = 0xff707070;
      } else if (flag1) {
        i8 = 65280 + (c << 24);
      }

      drawHorizontalLine(l3, i5, k4, i8);
      drawVerticalLine(i5, k4, l5, i8);
    }

    Achievement achievement = null;
    RenderItem renderitem = new RenderItem();
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);

    for (int i4 = 0; i4 < AchievementList.achievementList.size(); i4++) {
      Achievement achievement2 = (Achievement) AchievementList.achievementList.get(i4);
      int j5 = achievement2.displayColumn * 24 - i;
      int i6 = achievement2.displayRow * 24 - j;

      if (j5 < -24 || i6 < -24 || j5 > 224 || i6 > 155) {
        continue;
      }

      if (statFileWriter.hasAchievementUnlocked(achievement2)) {
        float f1 = 1.0F;
        GL11.glColor4f(f1, f1, f1, 1.0F);
      } else if (statFileWriter.canUnlockAchievement(achievement2)) {
        float f2 =
            Math.sin(((double) (System.currentTimeMillis() % 600L) / 600D) * Math.PI * 2D)
                    >= 0.59999999999999998D
                ? 0.8F
                : 0.6F;
        GL11.glColor4f(f2, f2, f2, 1.0F);
      } else {
        float f3 = 0.3F;
        GL11.glColor4f(f3, f3, f3, 1.0F);
      }

      mc.renderEngine.bindTexture(l);
      int k6 = k1 + j5;
      int j7 = l1 + i6;

      if (achievement2.getSpecial()) {
        drawTexturedModalRect(k6 - 2, j7 - 2, 26, 202, 26, 26);
      } else {
        drawTexturedModalRect(k6 - 2, j7 - 2, 0, 202, 26, 26);
      }

      if (!statFileWriter.canUnlockAchievement(achievement2)) {
        float f4 = 0.1F;
        GL11.glColor4f(f4, f4, f4, 1.0F);
        renderitem.field_27004_a = false;
      }

      GL11.glEnable(GL11.GL_LIGHTING);
      GL11.glEnable(GL11.GL_CULL_FACE);
      renderitem.renderItemIntoGUI(
          mc.fontRenderer, mc.renderEngine, achievement2.theItemStack, k6 + 3, j7 + 3);
      GL11.glDisable(GL11.GL_LIGHTING);

      if (!statFileWriter.canUnlockAchievement(achievement2)) {
        renderitem.field_27004_a = true;
      }

      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

      if (par1 >= k1
          && par2 >= l1
          && par1 < k1 + 224
          && par2 < l1 + 155
          && par1 >= k6
          && par1 <= k6 + 22
          && par2 >= j7
          && par2 <= j7 + 22) {
        achievement = achievement2;
      }
    }

    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(l);
    drawTexturedModalRect(i1, j1, 0, 0, achievementsPaneWidth, achievementsPaneHeight);
    GL11.glPopMatrix();
    zLevel = 0.0F;
    GL11.glDepthFunc(GL11.GL_LEQUAL);
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    super.drawScreen(par1, par2, par3);

    if (achievement != null) {
      String s = StatCollector.translateToLocal(achievement.getName());
      String s1 = achievement.getDescription();
      int k5 = par1 + 12;
      int j6 = par2 - 4;

      if (statFileWriter.canUnlockAchievement(achievement)) {
        int l6 = Math.max(fontRenderer.getStringWidth(s), 120);
        int k7 = fontRenderer.splitStringWidth(s1, l6);

        if (statFileWriter.hasAchievementUnlocked(achievement)) {
          k7 += 12;
        }

        drawGradientRect(k5 - 3, j6 - 3, k5 + l6 + 3, j6 + k7 + 3 + 12, 0xc0000000, 0xc0000000);
        fontRenderer.drawSplitString(s1, k5, j6 + 12, l6, 0xffa0a0a0);

        if (statFileWriter.hasAchievementUnlocked(achievement)) {
          fontRenderer.drawStringWithShadow(
              StatCollector.translateToLocal("achievement.taken"), k5, j6 + k7 + 4, 0xff9090ff);
        }
      } else {
        int i7 = Math.max(fontRenderer.getStringWidth(s), 120);
        String s2 =
            StatCollector.translateToLocalFormatted(
                "achievement.requires",
                new Object[] {
                  StatCollector.translateToLocal(achievement.parentAchievement.getName())
                });
        int l7 = fontRenderer.splitStringWidth(s2, i7);
        drawGradientRect(k5 - 3, j6 - 3, k5 + i7 + 3, j6 + l7 + 12 + 3, 0xc0000000, 0xc0000000);
        fontRenderer.drawSplitString(s2, k5, j6 + 12, i7, 0xff705050);
      }

      fontRenderer.drawStringWithShadow(
          s,
          k5,
          j6,
          statFileWriter.canUnlockAchievement(achievement)
              ? achievement.getSpecial() ? -128 : -1
              : achievement.getSpecial() ? 0xff808040 : 0xff808080);
    }

    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_LIGHTING);
    RenderHelper.disableStandardItemLighting();
  }
Ejemplo n.º 22
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int x, int y, float z) {
    drawDefaultBackground();
    drawCenteredString(fontRenderer, screenTitle, width / 2, 40, 0xffffff);

    // Spout Start
    if (org.spoutcraft.client.config.ConfigReader.showChatColors) {
      for (int c = 0; c < 16; c++) {
        ChatColor value = ChatColor.getByCode(c);
        String name = value.name().toLowerCase();
        boolean lastUnderscore = true;
        String parsedName = "";
        for (int chr = 0; chr < name.length(); chr++) {
          char ch = name.charAt(chr);
          if (lastUnderscore) {
            ch = Character.toUpperCase(ch);
          }
          if (ch == '_') {
            lastUnderscore = true;
            ch = ' ';
          } else {
            lastUnderscore = false;
          }
          parsedName += ch;
        }
        char code = (char) ('0' + c);
        if (c >= 10) {
          code = (char) ('a' + c - 10);
        }
        fontRenderer.drawStringWithShadow(
            "&" + code + " - " + value + parsedName, width - 90, 70 + c * 10, 0xffffffff);
      }
    }
    // Spout end

    GL11.glPushMatrix();
    GL11.glTranslatef(width / 2, 0.0F, 50F);
    float f = 93.75F;
    GL11.glScalef(-f, -f, -f);
    GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
    Block block = entitySign.getBlockType();

    if (block == Block.signPost) {
      float f1 = (float) (entitySign.getBlockMetadata() * 360) / 16F;
      GL11.glRotatef(f1, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
    } else {
      int i = entitySign.getBlockMetadata();
      float f2 = 0.0F;

      if (i == 2) {
        f2 = 180F;
      }

      if (i == 4) {
        f2 = 90F;
      }

      if (i == 5) {
        f2 = -90F;
      }

      GL11.glRotatef(f2, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
    }

    // Spout start
    // if(this.updateCounter / 6 % 2 == 0) {
    this.entitySign.lineBeingEdited = this.editLine;
    entitySign.columnBeingEdited = editColumn;
    // }
    // Spout end

    TileEntityRenderer.instance.renderTileEntityAt(entitySign, -0.5D, -0.75D, -0.5D, 0.0F);
    // Spout start
    this.entitySign.lineBeingEdited = -1;
    entitySign.columnBeingEdited = -1;
    // Spout end
    GL11.glPopMatrix();
    super.drawScreen(x, y, z);
    // Spout start
    if (unicode.enabled
        && isInBoundingRect(
            unicode.xPosition,
            unicode.yPosition,
            unicode.field_52007_b,
            unicode.field_52008_a,
            x,
            y)) {
      this.drawTooltip(
          "Some servers censor unicode characters. \nIf yours does, try sending as plain text.",
          x,
          y);
    }
    // Spout end
  }
Ejemplo n.º 23
0
 @Override
 public void drawScreen(int par1, int par2, float par3) {
   modList.drawScreen(par1, par2, par3);
   int d = updateDownloads();
   drawCenteredString(
       fontRenderer,
       UpdateManager.online
           ? "Mod Update Manager by TheWhiteWolves: "
               + UpdateManager.getQuantEntries(Boolean.valueOf(true), UpdateManager.loadedModsMap)
               + "/"
               + UpdateManager.loadedModsSet.size()
               + (d > 0 ? " (" + d + " ongoing Downloads)" : ".")
           : "Mod Update Manager (OFFLINE)",
       width / 2,
       16,
       0xFFFFFF);
   if (UpdateManager.online)
     fontRenderer.drawStringWithShadow(
         motwWeek == null
             ? motwWeek =
                 getMotwWeek("https://dl.dropbox.com/u/43671482/Update%20Manager/MotW_Week.txt")
             : motwWeek,
         180,
         height - 9,
         0xFFFFFF);
   int offset = listWidth + 20;
   UpdateManagerMod selectedMod;
   if (getSelected() >= 0 && (selectedMod = mods.get(getSelected())) != null) {
     int shifty = 35;
     Dimension dim = selectedMod.renderIcon(offset, shifty, this);
     offset += dim.width;
     GL11.glPushMatrix();
     GL11.glScalef(2.0F, 2.0F, 2.0F);
     fontRenderer.drawStringWithShadow(
         selectedMod.getModName(),
         offset / 2,
         shifty / 2 + (dim.height == 0 ? 0 : (dim.height / 2 - 12)),
         selectedMod.getModType().getHex());
     GL11.glScalef(1.0F, 1.0F, 1.0F);
     GL11.glPopMatrix();
     shifty += Math.max(25, dim.height);
     shifty =
         typeLine(
             selectedMod.getModType() != ModType.UNDEFINED
                 ? "Mod Type: " + selectedMod.getModType().getName()
                 : null,
             offset,
             shifty);
     shifty =
         typeLine(
             selectedMod.getReleaseType() != ModReleaseType.RELEASED
                 ? selectedMod.getReleaseType().getName()
                 : null,
             offset,
             shifty,
             selectedMod.getReleaseType().getHex());
     shifty += 5;
     shifty = typeLine("Client Version: " + selectedMod.getUMVersion(), offset, shifty);
     shifty =
         typeLine(
             "Latest Version: " + (UpdateManager.getWebVersionFor(selectedMod)), offset, shifty);
     shifty += 15;
     if (selectedMod.addNotes() != null) {
       shifty = typeLine(selectedMod.getNotesHeadliner(), offset + 10, shifty);
       for (String s : selectedMod.addNotes()) shifty = typeLine(s, offset + 10, shifty);
     }
     if (ThreadDownloadMod.downloadings.contains(selectedMod.getModName()))
       fontRenderer.drawStringWithShadow(
           "Downloading...",
           width - 6 - fontRenderer.getStringWidth("Downloading..."),
           110,
           0x00FF00);
   }
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 24
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    if (panorama) {
      renderSkybox(par1, par2, par3);
    } else {
      drawDefaultBackground();
    }
    Tessellator tessellator = Tessellator.instance;
    if (oldlogo) {
      drawLogo(par3);
    }
    char c = 274;
    int i = width / 2 - c / 2;
    byte byte0 = 30;
    if (panorama) {
      drawGradientRect(0, 0, width, height, 0x80ffffff, 0xffffff);
      drawGradientRect(0, 0, width, height, 0, 0x80000000);
    }
    if (!oldlogo) {
      mc.func_110434_K().func_110577_a(field_110352_y);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

      if ((double) updateCounter < 0.0001D) {
        drawTexturedModalRect(i + 0, byte0 + 0, 0, 0, 99, 44);
        drawTexturedModalRect(i + 99, byte0 + 0, 129, 0, 27, 44);
        drawTexturedModalRect(i + 99 + 26, byte0 + 0, 126, 0, 3, 44);
        drawTexturedModalRect(i + 99 + 26 + 3, byte0 + 0, 99, 0, 26, 44);
        drawTexturedModalRect(i + 155, byte0 + 0, 0, 45, 155, 44);
      } else {
        drawTexturedModalRect(i + 0, byte0 + 0, 0, 0, 155, 44);
        drawTexturedModalRect(i + 155, byte0 + 0, 0, 45, 155, 44);
      }
    }

    tessellator.setColorOpaque_I(0xffffff);
    GL11.glPushMatrix();
    GL11.glTranslatef(width / 2 + 90, 70F, 0.0F);
    GL11.glRotatef(-20F, 0.0F, 0.0F, 1.0F);
    float f =
        1.8F
            - MathHelper.abs(
                MathHelper.sin(
                        ((float) (Minecraft.getSystemTime() % 1000L) / 1000F)
                            * (float) Math.PI
                            * 2.0F)
                    * 0.1F);
    f = (f * 100F) / (float) (fontRenderer.getStringWidth(splashText) + 32);
    GL11.glScalef(f, f, f);
    drawCenteredString(fontRenderer, splashText, 0, -8, 0xffff00);
    GL11.glPopMatrix();
    String s = version.contains(":") ? version.split(":", 2)[1] : version;
    if (s.equals("OFF")) {
      s = "Minecraft " + (new CallableMinecraftVersion(null)).minecraftVersion();
    }

    if (mc.isDemo()) {
      s = (new StringBuilder()).append(s).append(" Demo").toString();
    }

    if (panorama) {
      drawString(fontRenderer, s, 2, height - 10, 0xffffff);
    } else {
      drawString(fontRenderer, s, 2, 2, 0x505050);
    }
    String s1 = "Copyright Mojang AB. Do not distribute!";
    drawString(
        fontRenderer, s1, width - fontRenderer.getStringWidth(s1) - 2, height - 10, 0xffffff);

    if (field_92025_p != null && field_92025_p.length() > 0) {
      drawRect(
          field_92022_t - 2, field_92021_u - 2, field_92020_v + 2, field_92019_w - 1, 0x55200000);
      drawString(fontRenderer, field_92025_p, field_92022_t, field_92021_u, 0xffffff);
      drawString(
          fontRenderer,
          field_96138_a,
          (width - field_92024_r) / 2,
          ((GuiButton) buttonList.get(0)).yPosition - 12,
          0xffffff);
    }

    super.drawScreen(par1, par2, par3);
  }
Ejemplo n.º 25
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   worldSlotContainer.drawScreen(par1, par2, par3);
   drawCenteredString(fontRenderer, screenTitle, width / 2, 20, 0xffffff);
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 26
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   this.drawDefaultBackground();
   this.drawCenteredString(this.fontRenderer, this.field_73888_d, this.width / 2, 20, 16777215);
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 27
0
 public void drawScreen(int var1, int var2, float var3) {
   drawDefaultBackground();
   super.drawScreen(var1, var2, var3);
 }
 public void drawScreen(int i, int j, float f) {
   drawDefaultBackground();
   drawCenteredString(fontRenderer, field_22107_a, width / 2, 20, 0xffffff);
   super.drawScreen(i, j, f);
 }
Ejemplo n.º 29
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   drawRect(2, this.height - 14, this.width - 2, this.height - 2, Integer.MIN_VALUE);
   this.inputField.drawTextBox();
   super.drawScreen(par1, par2, par3);
 }