Package forgottentowns.mod.api
Interface RegistryAccess
public interface RegistryAccess
Read-only definition snapshots after enabled packs have composed and validated.
Snapshots may be retained; they contain no live entities, managers or mutable game state.
Generated trade-good resources and their packing/unpacking recipes are included as startup summaries.
Generated equipment variants and other runtime-derived definitions are not generally included.
Available through
ModContext.onRegistriesReady(java.util.function.Consumer<forgottentowns.mod.api.RegistryAccess>).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordOne authored definition or generated startup summary, excluding its identity field from the values map. -
Method Summary
Modifier and TypeMethodDescriptionEnumerates composed definitions, followed by any generated startup entries added to that registry.Looks up an exact, stable identity without scanning game objects.names()Lists the supported content registry names in deterministic order.
-
Method Details
-
names
Lists the supported content registry names in deterministic order.- Returns:
- immutable registry names
-
entries
Enumerates composed definitions, followed by any generated startup entries added to that registry.- Parameters:
registry- supported name fromnames()- Returns:
- immutable definitions; nested values are also immutable
- Throws:
IllegalArgumentException- if the registry is unknown
-
find
Looks up an exact, stable identity without scanning game objects.- Parameters:
registry- supported registry nameid- exact base or namespaced identity; resource identity for food and equipment- Returns:
- definition snapshot, or empty if the exact identity is absent
- Throws:
IllegalArgumentException- if the registry is unknown
-