Search in sources :

Example 6 with ToolTip

use of mods.railcraft.common.gui.tooltips.ToolTip in project Railcraft by Railcraft.

the class ItemFirestoneRefined method addInformation.

@Override
public void addInformation(ItemStack stack, EntityPlayer player, List<String> info, boolean adv) {
    String tipTag = getUnlocalizedName() + ".tips.charged";
    if (stack.getItemDamage() >= stack.getMaxDamage() - 5)
        tipTag = getUnlocalizedName() + ".tips.empty";
    ToolTip tip = ToolTip.buildToolTip(tipTag);
    if (tip != null)
        info.addAll(tip.convertToStrings());
}
Also used : ToolTip(mods.railcraft.common.gui.tooltips.ToolTip)

Aggregations

ToolTip (mods.railcraft.common.gui.tooltips.ToolTip)6 GuiBetterButton (mods.railcraft.client.gui.buttons.GuiBetterButton)1 GuiSimpleButton (mods.railcraft.client.gui.buttons.GuiSimpleButton)1 SlotRailcraft (mods.railcraft.common.gui.slots.SlotRailcraft)1 Widget (mods.railcraft.common.gui.widgets.Widget)1 InventoryPlayer (net.minecraft.entity.player.InventoryPlayer)1 ItemStack (net.minecraft.item.ItemStack)1