diff --git a/src/tconstruct/items/tools/Shortbow.java b/src/tconstruct/items/tools/Shortbow.java index 7e0c9606da2..55f7c38c6aa 100644 --- a/src/tconstruct/items/tools/Shortbow.java +++ b/src/tconstruct/items/tools/Shortbow.java @@ -96,7 +96,7 @@ public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boo @SideOnly(Side.CLIENT) public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) { - if (!stack.hasTagCompound()) + if (!stack.hasTagCompound()) return; NBTTagCompound tags = stack.getTagCompound(); @@ -119,6 +119,24 @@ else if (power > this.getMaxCharge(stack) * 2 / 3) String charge = new StringBuilder().append(color).append(tags.getInteger("charge")).append("/").append(getMaxCharge(stack)).append(" EU").toString(); list.add(charge); } + if (tags.hasKey("Energy")) + { + String color = ""; + int RF = tags.getInteger("Energy"); + + if (RF != 0) + { + if (RF <= this.getMaxEnergyStored(stack) / 3) + color = "\u00a74"; + else if (RF > this.getMaxEnergyStored(stack) * 2 / 3) + color = "\u00a72"; + else + color = "\u00a76"; + } + + String energy = new StringBuilder().append(color).append(tags.getInteger("Energy")).append("/").append(getMaxEnergyStored(stack)).append(" RF").toString(); + list.add(energy); + } if (tags.hasKey("InfiTool")) { boolean broken = tags.getCompoundTag("InfiTool").getBoolean("Broken");