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 voidaddAlias(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 theoldIdentifierwill be redirected towardsnewId. This is useful if a mod wants to change an ID without breaking compatibility with existing worlds.- Parameters:
old- theIdentifierthat will become an alias fornewIdnewId- theIdentifierfor whicholdwill become an alias
-