Skip to content

Commit

Permalink
Always add food descriptor tooltip strings directly under the item name
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed Sep 21, 2014
1 parent 0b2b427 commit 99680b9
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -45,6 +45,7 @@
import squeek.applecore.api.food.FoodValues;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
Expand Down Expand Up @@ -393,7 +394,7 @@ public void onBlockHarvested(BlockEvent.HarvestDropsEvent event)
}
}

@SubscribeEvent
@SubscribeEvent(priority=EventPriority.LOWEST)
public void renderTooltips(ItemTooltipEvent event)
{
if (IguanaConfig.addFoodTooltips && AppleCoreAPI.accessor.isFood(event.itemStack))
Expand Down Expand Up @@ -441,7 +442,8 @@ else if (satiation < 0.0F)
}
}

event.toolTip.add(mealDescriptor.substring(0, 1).toUpperCase() + mealDescriptor.substring(1));
int topIndex = event.toolTip.size() > 0 ? 1 : 0;
event.toolTip.add(topIndex, mealDescriptor.substring(0, 1).toUpperCase() + mealDescriptor.substring(1));
}
if (IguanaConfig.wrongBiomeRegrowthMultiplier > 1)
{
Expand Down

0 comments on commit 99680b9

Please sign in to comment.