Use type safe base method to add information to the tooltip

This commit is contained in:
thatsIch
2014-11-04 15:31:55 +01:00
parent 8c144b22cc
commit 4e1b93b842
13 changed files with 68 additions and 52 deletions
@@ -69,13 +69,13 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
}
@Override
public void addInformation(ItemStack is, EntityPlayer p, List l, boolean more)
public void addCheckedInformation(ItemStack stack, EntityPlayer player, List<String> lines, boolean displayAdditionalInformation )
{
ICraftingPatternDetails details = getPatternForItem( is, p.worldObj );
ICraftingPatternDetails details = getPatternForItem( stack, player.worldObj );
if ( details == null )
{
l.add( EnumChatFormatting.RED + GuiText.InvalidPattern.getLocal() );
lines.add( EnumChatFormatting.RED + GuiText.InvalidPattern.getLocal() );
return;
}
@@ -96,7 +96,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
continue;
}
l.add( (first ? label : and) + anOut.getStackSize() + " " + Platform.getItemDisplayName( anOut ) );
lines.add( (first ? label : and) + anOut.getStackSize() + " " + Platform.getItemDisplayName( anOut ) );
first = false;
}
@@ -108,7 +108,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
continue;
}
l.add( (first ? with : and) + anIn.getStackSize() + " " + Platform.getItemDisplayName( anIn ) );
lines.add( (first ? with : and) + anIn.getStackSize() + " " + Platform.getItemDisplayName( anIn ) );
first = false;
}
}