private void renderBookOverlay(ScaledResolution resolution, ItemStack stack, IItemPage page) {
   int sx = resolution.getScaledWidth() / 2 - 17;
   int sy = resolution.getScaledHeight() / 2 + 2;
   mc.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.manual), sx + 20, sy - 16);
   if (mc.thePlayer.isSneaking()) {
     GlStateManager.pushMatrix();
     GlStateManager.color(1f, 1f, 1f);
     mc.fontRendererObj.drawStringWithShadow(stack.getDisplayName(), sx + 39, sy - 13, 0x00BFFF);
     mc.fontRendererObj.drawStringWithShadow(
         EnumChatFormatting.ITALIC + LangUtil.translate(page.worldDescription(stack)),
         sx + 39,
         sy - 4,
         0xBABABA);
     GlStateManager.color(1f, 1f, 1f);
     GlStateManager.popMatrix();
   } else {
     GlStateManager.pushMatrix();
     GlStateManager.scale(0.5, 0.5, 0.5);
     GlStateManager.translate((sx * 2) + 45, (sy * 2) + 2, 0);
     GlStateManager.color(1f, 1f, 1f);
     mc.fontRendererObj.drawStringWithShadow(
         LangUtil.translate("gui.augmentedaccessories.hud.shift"), 0, 0, 0xFFFFFF);
     GlStateManager.color(1f, 1f, 1f);
     GlStateManager.popMatrix();
   }
 }
示例#2
0
 @Override
 @SideOnly(Side.CLIENT)
 public void addInformation(
     ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) {
   if (stack != null)
     tooltip.add(
         LangUtil.translate(
             "item.powertools.fusioncore.energy",
             formater.format(getEnergyStored(stack)),
             formater.format(getMaxEnergyStored(stack))));
 }