Is it possible to grant an advancement upon entering a custom structure?

Started by Trinity Slasher on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to grant an advancement upon entering a custom structure?

I'm making a mod that has a custom structure within a custom biome. I already have the advancement for entering the biome, but I want to know if it is possible to grant an advancement upon entering a structure, because I can't find any procedure blocks for it or even just a default thing on the dropdown on the advancement page. I'm using version 2020.4 so if anyone knows a solution that would be great.

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Lock code of your…
Tue, 10/27/2020 - 18:29

Lock code of your advancement and replace its trigger code with:

"trigger": "minecraft:location",
"conditions": {
  "feature": "your_mod_id:your_structure_registry_name"
}

 

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tried that and It game me it…
Thu, 02/18/2021 - 22:34

Tried that and It game me it instaly as I joined the game.

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you maybe got the trigger…
Wed, 05/03/2023 - 14:29

you maybe got the trigger active aka "player joins the world"