-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to display bee lore and add Discoverd by tag #79
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is cool. And I suggest to extend it to all species - including trees and butterflies. Also I suggest to add little bit of formatting to lore tooltip.
If you need some help with implementation then you can follow advices below:
- Create method
void addLore(List<String> list)
inIIndividual
interface with default empty implementation (for backward compatibility). - Modify method
ItemGE:addInformation
to call this method when specific key is pressed. Add information about the key otherwise (look at logic of shift key). - Implement method
addLore
forBee
,Tree
, andButterfly
classes. You can use your current solution. Don't forget to nicely format your text (useEnumChatFormatting
) 😸
Also there is client-only helper method for splitting tooltips: FontRenderer:listFormattedStringToWidth
.
@Nilau1998 Any news here? Do you plan to continue working on this PR? |
Yes I do plan to finish this up. I just can't until Wednesday next week because I have a final exam there. |
20240910_224321.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
Just make your changes backward compatible and clean up some unnecessary checks and that's all.
The Forestry description within language files previously has only been used in the Beealyser. Probably nobody ever saw that there.

In the future if people add more bees and maybe want to add some own story to it, others will be able to see it within the tooltip by holding ctrl-shift.
Additionally the "Discovered by" tag was added to the tooltip which is always shown when holding shift. This goes along the idea that crops already provide this feature. This also gives the give credit to those who may add bees.. well or those who want to add more lore.
If no lore is provided, then the tooltip just doesn't show any. Same with goes with the discovered by, if no name is placed, than nothing is shown.
The code works by expanding the already existing
for.description.species
localizations in the lang files. I simply added another|
token for the Discovered by.Turns to:
PS: Sorry for the ugly picture of my screen, my screenshot hotkey is Ctrl-Shift-F4 and I'm too lazy to change it to take the Shift-Tooltip case. 😛