Advancements Tracker and  Overview

Advancements Tracker and Overview

97.2k Downloads

[1.16.5] Datapacked custom advancements when set to "default track" don't actually show up on tracker

Kaleidio opened this issue ยท 4 comments

commented

Describe the bug
In the config's Tracked Advancements I have my datapacked advancement put into the array, in hopes that it will show up on start so the player knows their main goal. This advancement is registered correctly, as I am able to give the advancement manually with a command.

When I give it, briefly, if only for one server tick or so, I can see the advancement tracker change to show it was being tracked, but the client never showed it.

To Reproduce
Steps to reproduce the behavior:

  1. download any advancement datapack
  2. seek an advancement id from the datapack to use using commands
  3. add it to the config
  4. create a new world, and the advancement tracker will still say it's tracking no advancements anyway

Expected behavior
I believe this might be caused by order of advancement registry in some fashion. it is possible your mod only works with advancements provided by mods since they might be getting registered first. The mod should support changing its view on datapack reload. If that is not the problem, I believe it's possible the tracker on the client side simply does not change the visual until after it is granted for whatever reason.

commented

Thanks for the details. Unfortunately this is something I can't implement from the client side.

The client has no idea about "possible" advancements and will only get a list of advanced from the server, as soon the "parent" advancement was gained.

One way to solve this would be to give the player an item / book on the start and set the custom root advancement triggered by this given item like:

  ...
  "criteria": {
    "crafting_table": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "items": [
          {
            "items": ["minecraft:crafting_table"]
          }
        ]
      }
    }
  },
  "requirements": [["crafting_table"]]
 ...

There are many more ways which could be used to trigger the root advancement as soon as possible.
See: https://minecraft.fandom.com/wiki/Advancement/JSON_format

If your custom advancement depends on the standard Minecraft advancement, I recommend to create a new root advancement with a guiding book or so and use this as starting point.

commented

update on this, after further testing it seems that the advancement only shows up on the tracker after getting some other non-related advancement.

commented

ah I see, what's going on is the category doesn't unlock until any advancement is achieved, and then and only then will the advancement added to the config show up. by any chance can you enhance the mod so that it can be configured to show that advancement regardless if its predecessors were gotten?

reference, the Steve head is my custom advancement. the tracker only showed it after monster hunter was gained, which opened the adventure tab
2022-01-15_02 15 30

commented

Thank you