How to Use the Revelationary API in Your Own Mod
When to Use the API Instead of Datapacks
Datapacks are ideal for pack authors who want to declare revelations without code. If you are writing a mod and need revelations to react dynamically, such as revealing blocks based on custom logic or syncing with your own progression system, the Revelationary API is the better fit. The API lets you register revelations programmatically and control visibility from your code.
Registering a Revelation
Use the API to register a revelation that maps disguised block states and items to their real counterparts, and associate it with an advancement or a visibility predicate. The exact method names depend on the mod version, so consult the API source or Javadoc bundled with the mod rather than guessing. The key concept is the same as the datapack path: a disguised representation plus a condition that controls when the real one appears.
Handling Per-Player State
Because visibility is per player, your code should not assume a global reveal. Trigger reveals through advancements or your own per-player checks so each client sees the correct version. Test on a dedicated server with multiple players to confirm that one player's reveal does not leak to others. If you need help, the mod's repository and issue tracker are the right places to ask.