Interface FabricRegistry


@NonExtendable public interface FabricRegistry
General-purpose Fabric-provided extensions for Registry objects.

Note: This interface is automatically implemented on all registries via Mixin and interface injection.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Adds an alias for an entry in this registry.
  • Method Details

    • addAlias

      default void addAlias(Identifier old, Identifier newId)
      Adds an alias for an entry in this registry. Once added, all queries to this registry that refer to the old Identifier will be redirected towards newId. This is useful if a mod wants to change an ID without breaking compatibility with existing worlds.
      Parameters:
      old - the Identifier that will become an alias for newId
      newId - the Identifier for which old will become an alias