[WIP] Advancement API#3625
Conversation
|
So looking more into this, it should also be possible to add a config option for per-world-advancements. Might be useful for some |
|
Not strictly per-world, but worlds that share the same "pool" of advancements. Example: Pool1: world + world_mining + world_the_end |
|
Yeah, I guess that would be the best way to do it. And that should probably be setup in the paper.yml, rather than programmatically. Since it should only be set once. |
|
Resources that might help developers:
|
|
@Trigary so I see you just created the JSON file and then called reloadData to load in the custom advancements. Would it be better to implement it like this, or better to hook directly into mc's AdvancementDataWorld class and add advancements purely programmatically? |
|
For a server API, using workarounds is not the greatest of ideas; if you can do it programmatically, prefer that. |
|
So as I continue to figure out exactly how the code is written for advancements, I think its probably best to hook into the existing JSON parsing that the advancements do. Especially the trigger stuff. Using as much of the json parsing also limits interaction and, more importantly changes to NMS code that break way more easily. |
4c789b8 to
d34a0ae
Compare
|
So it should be almost done. I still have to go through and add implementations for all the various triggers, but everything else should be there. |
|
Ok, should be only bug fixing left to do. I'd love some feedback on this whole thing, I'm sure I'm not using best practices in a bunch of places. |
46a73a5 to
1cefffe
Compare
|
excited for this to be merged. |
|
@dudeman123 its not 100% done yet. There is still a bunch of testing that has to be done. and all the javadocs for it. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Still plan on working on this in the future |
|
When will this get added? |
|
Please don't use the issue tracker to ask for ETAs, this PR is not even finished yet. |
|
So I'm trying to decide how to "setup" all the objects here, cause right now, (after I push latest changes) this PR will add at least 133 classes, most of which have to do with advancement conditions, triggers, predicates, etc. (there are a ton of them). And I'm wondering what the best way to have the API create them. Should they be mutable (getter/setter) or something like this? I don't want to create all these only to have to go back and change it later 😅 |
fab77a0 to
07c52e2
Compare
|
Well I decided to just push what I have so far, before I go further tho, I'd like some feedback on the general structure, or if this should even be a thing in the first place. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Commenting to unstale. This could even be implemented completely with adventure as it's a new API 👀 In order to make this an actually useful comment I'll leave some feedback:
|
|
@kezz so the
They are possible with vanilla advancements? You can specify various rewards for completing an advancement. |
|
Closing this until I come back to it. Slowly am working on the structure of it separately here. |
Creating this for myself. Various additions relating to advancements
Will add more as I think of/remember stuff.