-
-
Notifications
You must be signed in to change notification settings - Fork 698
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 advancement progress tracker (#4364) #4568
Conversation
Couldn't the progress language key be used from the Java translations? |
Java doesn't display a |
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.
Thanks! This looks good to me, will do some testing tomorrow.
Unfortunately, this PR won't be merged immediately as it adds a language string - currently, the cloud PR has to come first before language strings can be updated (could be a few days, it's nearing completion now)
Can we get before/after screenshots? |
I've attached before/after screenshots. As you'll see it's a very slight change that only appears when viewing a specific advancement. I didn't find any issues reported relating to the NPE, and since the fix was small I decided not to report one and just include it in this PR. If you're interested, here's the exception that would appear in the logs and prevent the advancements menu from opening:
|
* Fix fetching advancements with invalid parents * Add progress tracker to advancements * Use Java language key for progress counter
This pull request adds a progress tracker to the Bedrock advancements menu opened by
/geyser advancements
(closes #4364), and additionally fixes a problem I have noticed that causes the advancements menu to break in rare scenarios.A few notes:
AdvancementsCache#isEarned
method now internally uses the newAdvancementsCache#getProgress
method, to prevent code duplication.AdvancementsCache#isEarned
used to return as soon as it had discovered one requirement in the progress tracker that hasn't been met.AdvancementsCache#buildAndShowInfoForm
negates this performance impact a bit by only calling thegetProgress
method once, instead of calling bothisEarned
andgetProgress
.GeyserAdvancement
.