Interface DynamicRegistryManager

All Superinterfaces:
RegistryWrapper.WrapperLookup
All Known Subinterfaces:
DynamicRegistryManager.Immutable
All Known Implementing Classes:
DynamicRegistryManager.ImmutableImpl

public interface DynamicRegistryManager extends RegistryWrapper.WrapperLookup
A manager of dynamic registries. It allows users to access non-hardcoded registries reliably.

The DynamicRegistryManager.ImmutableImpl class serves as an immutable implementation of any particular collection or configuration of dynamic registries.

Mappings:
Namespace Name
official hn
intermediary net/minecraft/class_5455
named net/minecraft/registry/DynamicRegistryManager
  • Field Details

    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lhn;a:Lorg/slf4j/Logger;
      intermediary field_25918 Lnet/minecraft/class_5455;field_25918:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/registry/DynamicRegistryManager;LOGGER:Lorg/slf4j/Logger;
    • EMPTY

      Mappings:
      Namespace Name Mixin selector
      official b Lhn;b:Lhn$b;
      intermediary field_40585 Lnet/minecraft/class_5455;field_40585:Lnet/minecraft/class_5455$class_6890;
      named EMPTY Lnet/minecraft/registry/DynamicRegistryManager;EMPTY:Lnet/minecraft/registry/DynamicRegistryManager$Immutable;
  • Method Details

    • getOptional

      <E> Optional<Registry<E>> getOptional(RegistryKey<? extends Registry<? extends E>> key)
      Mappings:
      Namespace Name Mixin selector
      official c Lhn;c(Lace;)Ljava/util/Optional;
      intermediary method_33310 Lnet/minecraft/class_5455;method_33310(Lnet/minecraft/class_5321;)Ljava/util/Optional;
      named getOptional Lnet/minecraft/registry/DynamicRegistryManager;getOptional(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
    • getOptionalWrapper

      default <T> Optional<RegistryWrapper.Impl<T>> getOptionalWrapper(RegistryKey<? extends Registry<? extends T>> registryRef)
      Specified by:
      getOptionalWrapper in interface RegistryWrapper.WrapperLookup
      Mappings:
      Namespace Name Mixin selector
      official a Lhb$b;a(Lace;)Ljava/util/Optional;
      intermediary method_46759 Lnet/minecraft/class_7225$class_7874;method_46759(Lnet/minecraft/class_5321;)Ljava/util/Optional;
      named getOptionalWrapper Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;getOptionalWrapper(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
    • get

      default <E> Registry<E> get(RegistryKey<? extends Registry<? extends E>> key)
      Retrieves a registry from this manager, or throws an exception when the registry does not exist.
      Throws:
      IllegalStateException - if the registry does not exist
      Mappings:
      Namespace Name Mixin selector
      official d Lhn;d(Lace;)Lhm;
      intermediary method_30530 Lnet/minecraft/class_5455;method_30530(Lnet/minecraft/class_5321;)Lnet/minecraft/class_2378;
      named get Lnet/minecraft/registry/DynamicRegistryManager;get(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/registry/Registry;
    • streamAllRegistries

      Stream<DynamicRegistryManager.Entry<?>> streamAllRegistries()
      Mappings:
      Namespace Name Mixin selector
      official b Lhn;b()Ljava/util/stream/Stream;
      intermediary method_40311 Lnet/minecraft/class_5455;method_40311()Ljava/util/stream/Stream;
      named streamAllRegistries Lnet/minecraft/registry/DynamicRegistryManager;streamAllRegistries()Ljava/util/stream/Stream;
    • of

      static DynamicRegistryManager.Immutable of(Registry<? extends Registry<?>> registries)
      Mappings:
      Namespace Name Mixin selector
      official a Lhn;a(Lhm;)Lhn$b;
      intermediary method_40302 Lnet/minecraft/class_5455;method_40302(Lnet/minecraft/class_2378;)Lnet/minecraft/class_5455$class_6890;
      named of Lnet/minecraft/registry/DynamicRegistryManager;of(Lnet/minecraft/registry/Registry;)Lnet/minecraft/registry/DynamicRegistryManager$Immutable;
    • toImmutable

      default DynamicRegistryManager.Immutable toImmutable()
      Mappings:
      Namespace Name Mixin selector
      official c Lhn;c()Lhn$b;
      intermediary method_40316 Lnet/minecraft/class_5455;method_40316()Lnet/minecraft/class_5455$class_6890;
      named toImmutable Lnet/minecraft/registry/DynamicRegistryManager;toImmutable()Lnet/minecraft/registry/DynamicRegistryManager$Immutable;
    • getRegistryLifecycle

      default com.mojang.serialization.Lifecycle getRegistryLifecycle()
      Mappings:
      Namespace Name Mixin selector
      official d Lhn;d()Lcom/mojang/serialization/Lifecycle;
      intermediary method_41201 Lnet/minecraft/class_5455;method_41201()Lcom/mojang/serialization/Lifecycle;
      named getRegistryLifecycle Lnet/minecraft/registry/DynamicRegistryManager;getRegistryLifecycle()Lcom/mojang/serialization/Lifecycle;