This repository was archived by the owner on Nov 28, 2025. It is now read-only.
Add Advancements API#137
Merged
LukynkaCZE merged 25 commits intoDockyardMC:masterfrom Apr 22, 2025
p1k0chu:advancement
Merged
Conversation
LukynkaCZE
suggested changes
Apr 5, 2025
src/main/kotlin/io/github/dockyardmc/extentions/ExtendedByteBuf.kt
Outdated
Show resolved
Hide resolved
...ithub/dockyardmc/protocol/packets/play/serverbound/ServerboundSelectAdvancementsTabPacket.kt
Outdated
Show resolved
Hide resolved
Closed
Add packets and event for advancement tab selection
also THROW when icon is air.
LukynkaCZE
approved these changes
Apr 5, 2025
removed TODO because codefactor shut up
* fix multiple ConcurrentModificationException :skull emoji:
Contributor
|
How is this going :3 Are you planning on merging to 1.21.4 still? 1.21.5 will take a WHILE |
Contributor
Author
|
yes, im not waiting for 1.21.5, + need to fix stuff, like when deleting an advancement that has children, clients also delete all the children recursively, so need to keep track of that on server-side too also might actually make advancements mutable now that advancements will keep track of their children (you need to delete advancement and add it again to update properties, and then you probably need to send all the children again) |
Contributor
|
oki got it |
Keep track of advancement's children and parent.
its useless but since progress map is private might be good to have some public function to get progress
yeah they actually work
instead of having one billion collections just send a packet to a client when you add advancement, or remove, or change progress * fix: add advancement viewers to the list * fix: when disposing PlayerAdvancementTracker remove itself from all visible advancements
because if you send progress of an advancement, you need to send the full progress of that advancement dont need to send every advancement tho
also get rid of advancement display, in favor of just always having it (previously it was nullable). because displayless advancements are COMPLETELY useless here
cuz it should be static (or even outside of class)
LukynkaCZE
approved these changes
Apr 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
meh
no tree builder no node stuff just advancements here (means have to manually set the position)
boop:
there are toasts (the only reason you wanted advancements)
Player.showToastextension function that takes title, icon and a framealso event for when player selects an advancement tab