servertap icon indicating copy to clipboard operation
servertap copied to clipboard

Advancements

Open mplatypus opened this issue 2 years ago • 6 comments

add an event for advancements, and also the ability to check all advancements

mplatypus avatar Jul 23 '22 17:07 mplatypus

I can make a basic API at /v1/advancements which would produce something like

[
  {
    "name": "story/enter_the_end",
    "criteria": [
      "entered_end"
    ]
  },
  {
    "name": "husbandry/complete_catalogue",
    "criteria": [
      "textures/entity/cat/tabby.png",
      "textures/entity/cat/white.png",
      "textures/entity/cat/black.png",
      "textures/entity/cat/jellie.png",
      "textures/entity/cat/siamese.png",
      "textures/entity/cat/ragdoll.png",
      "textures/entity/cat/british_shorthair.png",
      "textures/entity/cat/all_black.png",
      "textures/entity/cat/persian.png",
      "textures/entity/cat/red.png",
      "textures/entity/cat/calico.png"
    ]
  },
  {
    "name": "recipes/decorations/light_gray_bed_from_white_bed",
    "criteria": [
      "has_bed",
      "has_the_recipe"
    ]
  },
  {
    "name": "recipes/decorations/light_gray_stained_glass_pane",
    "criteria": [
      "has_glass",
      "has_the_recipe"
    ]
  },
  {
    "name": "recipes/building_blocks/bone_block",
    "criteria": [
      "has_bone_meal",
      "has_the_recipe"
    ]
  }
]

Is there any other info we should include on each advancement @MPlatypus ?

I know you also asked for a new Event when someone gets an Advancement, I will work on that next. Let me know what you think.

phybros avatar Sep 08 '22 14:09 phybros

that looks awesome! do you know if it would work with other mods that add different advancements?

mplatypus avatar Sep 08 '22 14:09 mplatypus

@MPlatypus if you have an example I can install it and test

phybros avatar Sep 08 '22 14:09 phybros

the datapack is called Blaze and Caves advancements

mplatypus avatar Sep 08 '22 14:09 mplatypus

Yeah seems to work fine. I got bacap/advancement_legend and end/good_luck_getting_this_one which I think are both from that datapack.

Were you thinking we should also have a player API for them? like /v1/players/:id/advancements that shows all the advancements for a specific player?

phybros avatar Sep 08 '22 15:09 phybros

yeah that'd be awesome to grab all their advancements

mplatypus avatar Sep 08 '22 15:09 mplatypus

Going to close this since we added the basic advancements API back in 0.4.0. Getting advancements for specific players is a lot more convoluted, so I'll open a new issue for that.

phybros avatar Apr 11 '23 13:04 phybros