Added Feature: #0852 - Add a tooltip to un-despawnable items stating as such.

This commit is contained in:
AlgorithmX2 2014-08-09 23:42:40 -05:00
parent 8a8fde110c
commit 19ab2d9f04
2 changed files with 4 additions and 2 deletions

View file

@ -34,7 +34,7 @@ public enum ButtonToolTips
LevelType, LevelType_Energy, LevelType_Item, InventoryTweaks, TerminalStyle, TerminalStyle_Full, TerminalStyle_Tall, TerminalStyle_Small,
Stash, StashDesc, Encode, EncodeDescription, Substitutions, SubstitutionsOn, SubstitutionsOff, SubstitutionsDesc, CraftOnly, CraftEither, Craft, Mod;
Stash, StashDesc, Encode, EncodeDescription, Substitutions, SubstitutionsOn, SubstitutionsOff, SubstitutionsDesc, CraftOnly, CraftEither, Craft, Mod, DosntDespawn;
String root;

View file

@ -21,6 +21,7 @@ import appeng.api.implementations.items.IGrowableCrystal;
import appeng.api.recipes.ResolverResult;
import appeng.core.AppEng;
import appeng.core.features.AEFeature;
import appeng.core.localization.ButtonToolTips;
import appeng.entity.EntityGrowingCrystal;
import appeng.entity.EntityIds;
import appeng.items.AEBaseItem;
@ -76,7 +77,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
}
@Override
public int getEntityLifespan( ItemStack itemStack, World world )
public int getEntityLifespan(ItemStack itemStack, World world)
{
return Integer.MAX_VALUE;
}
@ -125,6 +126,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
@Override
public void addInformation(ItemStack stack, EntityPlayer p, List l, boolean b)
{
l.add( ButtonToolTips.DosntDespawn.getLocal() );
int progress = getProgress( stack ) % SINGLE_OFFSET;
l.add( Math.floor( (float) progress / (float) (SINGLE_OFFSET / 100) ) + "%" );
super.addInformation( stack, p, l, b );