diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java index e7f4f69ff..4501293f0 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java @@ -3,11 +3,17 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ItemUtil; +import ellpeck.actuallyadditions.util.KeyUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; + +import java.util.List; public class ItemBattery extends ItemEnergy implements INameableItem{ @@ -39,4 +45,15 @@ public class ItemBattery extends ItemEnergy implements INameableItem{ public String getName(){ return name; } + + @Override + @SuppressWarnings("unchecked") + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ + if(KeyUtil.isShiftPressed()){ + list.add(StatCollector.translateToLocal("tooltip."+ModUtil.MOD_ID_LOWER+".itemBattery.desc")); + list.add(this.getEnergyStored(stack) + "/" + this.getMaxEnergyStored(stack) + " RF"); + } + else list.add(ItemUtil.shiftForInfo()); + } } diff --git a/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java b/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java index ed9c1faba..b8a087d72 100644 --- a/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java +++ b/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java @@ -30,7 +30,8 @@ public class UpdateChecker{ @SubscribeEvent(receiveCanceled = true) public void onTick(TickEvent.ClientTickEvent event){ - if(!notified && doneChecking && event.phase == TickEvent.Phase.END && Minecraft.getMinecraft().thePlayer != null){ + //Don't notify directly to prevent the Message getting lost in Spam on World Joining + if(Minecraft.getSystemTime() % 300 == 0 && !notified && doneChecking && Minecraft.getMinecraft().thePlayer != null){ EntityPlayer player = Minecraft.getMinecraft().thePlayer; if(checkFailed){ player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".update.failed.desc"))); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index eaf9b0e65..30d8f013f 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -56,7 +56,11 @@ tooltip.actuallyadditions.blockMiscCharcoal.desc=Crafted from Charcoal item.actuallyadditions.itemMiscRiceSlime.name=Rice Slimeball tooltip.actuallyadditions.itemMiscRiceSlime.desc=It's sticky... and smells kinda good... -item.actuallyadditions.itemBattery.name=Battery +item.actuallyadditions.itemBattery.name=Single Battery +item.actuallyadditions.itemBatteryDouble.name=Double Battery +item.actuallyadditions.itemBatteryTriple.name=Triple Battery +item.actuallyadditions.itemBatteryQuadruple.name=Quadruple Battery +item.actuallyadditions.itemBatteryQuintuple.name=Quintuple Battery tooltip.actuallyadditions.itemBattery.desc=Stores RF! Charge in an Energizer! Discharge in an Enervator! tile.actuallyadditions.blockCoalGenerator.name=Coal Generator