Skip to content
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

Include locked recipe information in WAILA tooltip #3855

Merged
merged 8 commits into from
Feb 3, 2025

Conversation

mak8427
Copy link
Contributor

@mak8427 mak8427 commented Jan 24, 2025

This pull request modifies the WAILA tooltip to always show the locked recipe information, including the item that is producing, even if the recipe is not currently running.
Issue:
GTNewHorizons/GT-New-Horizons-Modpack#18793

@serenibyss serenibyss added the enhancement Improve an existing mechanic. Please explain the change with a before/after comparison. label Jan 24, 2025
@serenibyss
Copy link
Member

@mak8427 I know this is a draft, but peeking at the code, I think you need to set isLockedToRecipe on the NBT in the getWailaNBTData method to make this work properly

@KleinGrrmpf
Copy link

Thank you for doing this! <3

- Added configurable multi-line output in SingleRecipeCheck#getDisplayString(boolean includeInputs, boolean includeOutputs, boolean showStackAmounts, boolean multiLine)
  - Allows showing only outputs (or inputs) over multiple lines without stack amounts.
- Updated getWailaNBTData to store the locked recipe string using the new multi-line formatting.
- Modified getWailaBody to split the stored locked recipe string on "\n" and add each line individually to the tooltip,
  ensuring proper multi-line display even when "\n" is not rendered automatically.
@mak8427 mak8427 marked this pull request as ready for review February 1, 2025 22:32
@mak8427
Copy link
Contributor Author

mak8427 commented Feb 1, 2025

image

@mak8427
Copy link
Contributor Author

mak8427 commented Feb 1, 2025

@KleinGrrmpf Do you have any other suggestion ?

@KleinGrrmpf
Copy link

Looks great! I just don't know how crowded it could get with some recipes with multiple outputs.

@serenibyss serenibyss enabled auto-merge (squash) February 3, 2025 17:22
@serenibyss serenibyss merged commit 59c3ed2 into GTNewHorizons:master Feb 3, 2025
5 checks passed
@mak8427 mak8427 deleted the patch-1 branch February 3, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve an existing mechanic. Please explain the change with a before/after comparison.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants