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 TypeMethodDescriptiondefault void
addAlias
(Identifier old, Identifier newId) Adds an alias for an entry in this registry.
-
Method Details
-
addAlias
Adds an alias for an entry in this registry. Once added, all queries to this registry that refer to theold
Identifier
will be redirected towardsnewId
. This is useful if a mod wants to change an ID without breaking compatibility with existing worlds.- Parameters:
old
- theIdentifier
that will become an alias fornewId
newId
- theIdentifier
for whichold
will become an alias
-