Make Photovoltaic Cell more findable

* Photovoltaic Cell now has a common tooltip text
* It says "Solar power" because people search NEI for "solar" not
"photovoltaic"
* Support in TooltipAddera for common tooltips of
IResourceTooltipProviders
* Fixed Advanced Photovoltaic Cell not displaying detailed tooltip text
shared with Photovoltaic Cell in Vanilla tooltip (Waila was ok)
This commit is contained in:
HenryLoenwind committed 2015-02-07 16:30:45 +01:00
1 parent 87d7701ec0
commit 2ef8cbb377
4 files changed
+28 -1

No files matched your search

@@ -286,6 +286,20 @@ public class TooltipAddera {
}
}
public static void addCommonTooltipFromResources(List list, ItemStack itemstack) {
if(itemstack.getItem() == null) {
return;
}
String unloc = null;
if (itemstack.getItem() instanceof IResourceTooltipProvider) {
unloc = ((IResourceTooltipProvider)itemstack.getItem()).getUnlocalizedNameForTooltip(itemstack);
}
if(unloc == null) {
unloc = itemstack.getItem().getUnlocalizedName(itemstack);
}
addCommonTooltipFromResources(list, unloc);
}
public static void addDetailedTooltipFromResources(List list, ItemStack itemstack) {
if(itemstack.getItem() == null) {
return;