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 Classes
    Modifier and Type
    Interface
    Description
    static final record 
    One authored definition or generated startup summary, excluding its identity field from the values map.
  • Method Summary

    Modifier and Type
    Method
    Description
    entries(String registry)
    Enumerates composed definitions, followed by any generated startup entries added to that registry.
    find(String registry, String id)
    Looks up an exact, stable identity without scanning game objects.
    Lists the supported content registry names in deterministic order.
  • Method Details

    • names

      Set<String> 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 from names()
      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 name
      id - 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