mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-25 14:34:28 +00:00
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:
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;
|
||||
|
||||
Reference in new issue
Block a user