Custom advancement criterion registry
See original GitHub issueI am unable to determine how to add custom advancement criteria that I can trigger.
net.minecraft.advancement.criterion.CriterionCriterions
has a registration function but it is private. Unlike other registers, criterion do not have their own register yet.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
CriterionRegistry (fabric-api 0.32.5+local-1.16 API)
Registers a criterion for a trigger for advancements. Methods inherited from class java.lang.Object · clone, equals, finalize, getClass, hashCode, notify, ...
Read more >[1.16.1] Advancement quantity criterion - Modder Support
You can call CriteriaTriggers.register from FMLCommonSetupEvent (use DeferredWorkQueue, the registry is just a HashMap and thus not threadsafe).
Read more >Advancement/JSON format - Minecraft Wiki - Fandom
Custom advancements in data packs of a Minecraft world store the advancement ... When a criterion is newly completed or revoked, the advancement...
Read more >CriterionRegistry
CriterionRegistry ... Allows registering advancement criteria for triggers. A registered criterion (trigger) can be retrieved through getById. Functions Sources
Read more >Minecraft Modding: Custom Triggers (a.k.a. Criteria)
As explained in my overview on advancements, sometimes you want to create a ... So in order to register custom triggers (called "criterion")...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this can in fact be easily done with a invoker mixin:
the question remains whether that should be added to fabric API or whether mods should do that themselves, given how trivial the mixin is.
Hey! I wanted to get started on fabric development 😃 This looks like an easy feature to add for new people so I wanted to ask if I can take this over.
Is there some preferred way to expose the Criterion API or is making the register function statis good enough?