Package net.minecraft.client.gui

Examples of net.minecraft.client.gui.FontRenderer.drawString()


        lastFormat = format;
      }

      for(String s1 : wrappedLines) {
        y += 10;
        renderer.drawString(s1, x, y, 0);
      }

      y += 10;
    }
View Full Code Here


    Brew brew = recipe.getBrew();
    FontRenderer renderer = Minecraft.getMinecraft().fontRenderer;
    boolean unicode = renderer.getUnicodeFlag();
    renderer.setUnicodeFlag(true);
    String s = EnumChatFormatting.BOLD + String.format(StatCollector.translateToLocal("botaniamisc.brewOf"), StatCollector.translateToLocal(brew.getUnlocalizedName()));
    renderer.drawString(s, gui.getLeft() + gui.getWidth() / 2 - renderer.getStringWidth(s) / 2, y, 0x222222);
    renderer.setUnicodeFlag(unicode);
    PageText.renderText(x, y + 22, width, height, text);
   
    ItemStack book = Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem();
    if(book != null && book.getItem() instanceof ILexicon && ((ILexicon) book.getItem()).isKnowledgeUnlocked(book, BotaniaAPI.elvenKnowledge)) {
View Full Code Here

  public void renderManaBar(IGuiLexiconEntry gui, RecipeRuneAltar recipe, int mx, int my) {
    FontRenderer font = Minecraft.getMinecraft().fontRenderer;
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    String manaUsage = StatCollector.translateToLocal("botaniamisc.manaUsage");
    font.drawString(manaUsage, gui.getLeft() + gui.getWidth() / 2 - font.getStringWidth(manaUsage) / 2, gui.getTop() + 115, 0x66000000);

    int ratio = 10;
    int x = gui.getLeft() + gui.getWidth() / 2 - 50;
    int y = gui.getTop() + 125;
View Full Code Here

    String ratioString = String.format(StatCollector.translateToLocal("botaniamisc.ratio"), ratio);

    boolean unicode = font.getUnicodeFlag();
    font.setUnicodeFlag(true);
    font.drawString(ratioString, x + 100 - font.getStringWidth(ratioString), y + 5, 0x99000000);
    font.setUnicodeFlag(unicode);    GL11.glDisable(GL11.GL_BLEND);
  }

}
View Full Code Here

        offsetX = (realWidth - requiredWidth) / 2;
        offsetY = (realHeight - requiredHeight) / 2;

        GL11.glDisable(GL11.GL_LIGHTING);
        fontRenderer.drawString("\u00a7f" + amount, offsetX - (realWidth / 2), 1 + offsetY - (realHeight / 2), 1);
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glDepthMask(true);
        GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);

        GL11.glPopMatrix();
View Full Code Here

    offsetX = (realWidth - requiredWidth) / 2;
    offsetY = (realHeight - requiredHeight) / 2;

    GL11.glDisable(GL11.GL_LIGHTING);
    fontRenderer.drawString("\u00a7f" + text, offsetX - (realWidth / 2), 1 + offsetY - (realHeight / 2), 1);
    GL11.glEnable(GL11.GL_LIGHTING);
    GL11.glDepthMask(true);
    GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);

    GL11.glPopMatrix();
View Full Code Here

            tessellator.addVertex(-j - 1, 8 + b0, 0.0D);
            tessellator.addVertex(j + 1, 8 + b0, 0.0D);
            tessellator.addVertex(j + 1, -1 + b0, 0.0D);
            tessellator.draw();
            GL11.glEnable(GL11.GL_TEXTURE_2D);
            fontrenderer.drawString(par2Str, -fontrenderer.getStringWidth(par2Str) / 2, b0, 553648127);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glDepthMask(true);
            fontrenderer.drawString(par2Str, -fontrenderer.getStringWidth(par2Str) / 2, b0, -1);
            GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glDisable(GL11.GL_BLEND);
View Full Code Here

            tessellator.draw();
            GL11.glEnable(GL11.GL_TEXTURE_2D);
            fontrenderer.drawString(par2Str, -fontrenderer.getStringWidth(par2Str) / 2, b0, 553648127);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glDepthMask(true);
            fontrenderer.drawString(par2Str, -fontrenderer.getStringWidth(par2Str) / 2, b0, -1);
            GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glDisable(GL11.GL_BLEND);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glPopMatrix();
        }
View Full Code Here

                    Gui.drawRect(this.xPosition + 1, yCoord0, this.xPosition + this.width - 10, yCoord1, color);

                    if (currentDrawHeight + GuiElementGradientList.BUTTON_HEIGHT / 2 - fontRenderer.FONT_HEIGHT / 2 > this.yPosition && currentDrawHeight + GuiElementGradientList.BUTTON_HEIGHT / 2 + fontRenderer.FONT_HEIGHT / 2 < this.yPosition + this.height)
                    {
                        fontRenderer.drawString(displayButton.value, this.xPosition + (this.width - 10) / 2 - fontRenderer.getStringWidth(displayButton.value) / 2, currentDrawHeight + GuiElementGradientList.BUTTON_HEIGHT / 2 - fontRenderer.FONT_HEIGHT / 2, displayButton.color);
                    }

                }

                currentDrawHeight += GuiElementGradientList.BUTTON_HEIGHT;
View Full Code Here

          try {
            name = item.getUnlocalizedName();
          } catch(Exception e1) {}
        }
       
        var17.drawString("ID: " + String.valueOf(Item.getIdFromItem(item)), -var17.getStringWidth("ID: " + String.valueOf(Item.getIdFromItem(item))) / 2, 0 * 10 - 4 * 5, 0);
        ModuleCrafter logisticsMod=cpipe.getLogisticsModule();
        if(logisticsMod.satelliteId != 0) {
          var17.drawString("Sat ID: " + String.valueOf(logisticsMod.satelliteId), -var17.getStringWidth("Sat ID: " + String.valueOf(logisticsMod.satelliteId)) / 2, 1 * 10 - 4 * 5, 0);
        }
      } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.