Better tooltips

This commit is contained in:
aidancbrady 2016-07-06 17:53:14 -04:00
parent 42f27058c2
commit 52daff9f67
5 changed files with 18 additions and 5 deletions

View file

@ -158,11 +158,13 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
if(inv.getItemCount() > 0)
{
list.add(EnumColor.BRIGHT_GREEN + inv.getItemType().getDisplayName());
list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.itemAmount") + ": " + EnumColor.GREY + inv.getItemCount());
list.add(EnumColor.PURPLE + LangUtils.localize("tooltip.itemAmount") + ": " + EnumColor.GREY + inv.getItemCount());
}
else {
list.add(EnumColor.DARK_RED + LangUtils.localize("gui.empty"));
}
list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + BinTier.values()[getBaseTier(itemstack).ordinal()].storage + " " + LangUtils.localize("transmission.Items"));
}
else if(type == BasicType.INDUCTION_CELL)
{

View file

@ -64,6 +64,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
{
list.add(EnumColor.BRIGHT_GREEN + LangUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergyCubeTier(itemstack).maxEnergy));
if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey))
{

View file

@ -122,12 +122,14 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI
if(gasStack == null)
{
list.add(LangUtils.localize("tooltip.noGas") + ".");
list.add(EnumColor.DARK_RED + LangUtils.localize("gui.empty") + ".");
}
else {
list.add(LangUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
list.add(EnumColor.ORANGE + gasStack.getGas().getLocalizedName() + ": " + EnumColor.GREY + gasStack.amount);
}
list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + GasTankTier.values()[getBaseTier(itemstack).ordinal()].storage);
if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey))
{
list.add(LangUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + GameSettings.getKeyDisplayString(MekanismKeyHandler.sneakKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.forDetails") + ".");

View file

@ -179,8 +179,13 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
if(fluidStack != null)
{
list.add(EnumColor.PINK + LangUtils.localizeFluidStack(fluidStack) + ": " + EnumColor.GREY + getFluidStack(itemstack).amount + "mB");
list.add(EnumColor.AQUA + LangUtils.localizeFluidStack(fluidStack) + ": " + EnumColor.GREY + getFluidStack(itemstack).amount + "mB");
}
else {
list.add(EnumColor.DARK_RED + LangUtils.localize("gui.empty") + ".");
}
list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + FluidTankTier.values()[getBaseTier(itemstack).ordinal()].storage + " mB");
}
list.add(LangUtils.localize("tooltip.hold") + " " + EnumColor.INDIGO + GameSettings.getKeyDisplayString(MekanismKeyHandler.sneakKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.forDetails") + ".");

View file

@ -77,10 +77,13 @@ public class ItemTierInstaller extends ItemMekanism
public void getSubItems(Item item, CreativeTabs tabs, List itemList)
{
for(BaseTier tier : BaseTier.values())
{
if(tier.isObtainable())
{
itemList.add(new ItemStack(item, 1, tier.ordinal()));
}
}
}
@Override
public String getUnlocalizedName(ItemStack item)