Class RegistryAccess.ImmutableRegistryAccess

java.lang.Object
net.minecraft.core.RegistryAccess.ImmutableRegistryAccess
All Implemented Interfaces:
HolderLookup.Provider, RegistryAccess, IHolderLookupProviderExtension
Enclosing interface:
RegistryAccess

public static class RegistryAccess.ImmutableRegistryAccess extends Object implements RegistryAccess
  • Field Details

  • Constructor Details

  • Method Details

    • registry

      public <E> Optional<Registry<E>> registry(ResourceKey<? extends Registry<? extends E>> pRegistryKey)
      Get the registry owned by this registry access by the given key. If it doesn't exist, the default registry of registries is queried instead, which contains static registries such as blocks. The returned registry can not guarantee that it is writable here, so the return type is widened to Registry<E> instead.
      Specified by:
      registry in interface RegistryAccess
    • registries

      public Stream<RegistryAccess.RegistryEntry<?>> registries()
      Specified by:
      registries in interface RegistryAccess