sinkillerj / ProjectE

ProjectE. A complete rewrite of EE2 for modern Minecraft versions.
MIT License
394 stars 203 forks source link

[Suggestion] Tooltip to indicated learned or not. #2261

Open AWDoBaun opened 1 year ago

AWDoBaun commented 1 year ago

This is a small quality of life suggestion. Similar to the spice of life tooltip that indicates when a food item has been eaten at least once or not yet. This would indicate to players whether or not they have learned the recipe for a particular item or not.

If done would this be an addition to EMCHelper.java?

I see uses for the player when out in the world exploring or dealing with a wandering trader, you would be able to know at a glance of the tooltip whether an item is worth keeping to put into your table / tablet or not.

Hessin87 commented 1 year ago

+1Sent from my iPhoneOn Dec 4, 2022, at 11:44 AM, Andy @.***> wrote: This is a small quality of life suggestion. Similar to the spice of life tooltip that indicates when a food item has been eaten at least once or not yet. This would indicate to players whether or not they have learned the recipe for a particular item or not. If done would this be an addition to EMCHelper.java? I see uses for the player when out in the world exploring or dealing with a wandering trader, you would be able to know at a glance of the tooltip whether an item is worth keeping to put into your table / tablet or not.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

pupnewfster commented 1 year ago

Fairly certain this already exists? You just have to hold shift https://github.com/sinkillerj/ProjectE/blob/mc1.18.x/src/main/java/moze_intel/projecte/events/ToolTipEvent.java#L60

AWDoBaun commented 1 year ago

Okay. Thank you so much. I stand corrected. Now I want to change this suggestion to

A) Make this more visible.

B) Make it easier to understand.

Having seen the line of code you pointed me at I assume the output is the word "Transmutable".

image

versus

image

AWDoBaun commented 1 year ago

So I guess I would love to see

    if (Screen.hasShiftDown() && clientPlayer != null && clientPlayer.getCapability(PECapabilities.KNOWLEDGE_CAPABILITY).map(k -> k.hasKnowledge(current)).orElse(false)) {
        event.getToolTip().add(PELang.EMC_HAS_KNOWLEDGE.translateColored(ChatFormatting.YELLOW));
    }

change to

if (Screen.hasShiftDown() && clientPlayer != null )
{
    if ( clientPlayer.getCapability(PECapabilities.KNOWLEDGE_CAPABILITY).map(k -> k.hasKnowledge(current)).orElse(false)) 
    {
        event.getToolTip().add(PELang.EMC_HAS_KNOWLEDGE.translateColored(ChatFormatting.YELLOW));
    }
    else
    {
        event.getToolTip().add(PELang.EMC_HAS_NO_KNOWLEDGE.translateColored(ChatFormatting.RED));
    }
}

or equivalent. And I guess I would prefer if it was always visible, instead of hidden behind Screen.hasShiftDown(). No clue how many other folks might feel the same.

AWDoBaun commented 1 year ago

One pro for having this always visible: If some form of "learned"/"not learned yet" or even "transmutable"/"not transmutable" was always in the the tooltip then JEI/REI tools could search on it. Specifically searching on the not learned yet/not transmutable in a larger pack where many item may have EMC would let the players more easily find items to toss into their table.

REI search on "#EMC: #432" will locate any items with EMC values and the digits 432 appearing in their tooltip. REI search on "#Unlearned" or something equivalent might be really useful.