Beispiel #1
0
 @Override
 protected void drawGuiContainerForegroundLayer(int par1, int par2) {
   super.drawGuiContainerForegroundLayer(par1, par2);
   String info = MinechemHelper.getLocalString("gui.title.synthesis");
   int infoWidth = fontRenderer.getStringWidth(info);
   fontRenderer.drawString(info, (guiWidth - infoWidth) / 2, 5, 0x000000);
 }
 @Override
 protected void drawGuiContainerForegroundLayer(int i, int j) {
   super.drawGuiContainerForegroundLayer(i, j);
   GL11.glDisable(GL11.GL_LIGHTING);
   int x = GUI_STORAGE_BAR_X + storageBarWidth + 1;
   int y = GUI_STORAGE_BAR_Y + 7;
   String info;
   int color = 0xFFFFFF;
   if (vat.isSpoiled) {
     info = "Chemical Waste";
   } else if (vat.chemical != null) {
     info =
         String.format(
             "%s x %d", MinechemHelper.getChemicalName(vat.chemical), vat.amountOfChemical);
   } else {
     info = "Empty";
     fontRenderer.drawStringWithShadow("empty", x, y, 0xFFFFFF);
   }
   int infoWidth = fontRenderer.getStringWidth(info);
   int endX = GUI_STORAGE_BAR_X + GUI_MAX_STORAGE_WIDTH;
   if (endX - x <= infoWidth) {
     x = GUI_STORAGE_BAR_X + 1;
   }
   fontRenderer.drawStringWithShadow(info, x, y, color);
 }