Class DynamicRegistryManagerSetupContextImpl

java.lang.Object
org.quiltmc.qsl.frozenblock.core.registry.impl.DynamicRegistryManagerSetupContextImpl
All Implemented Interfaces:
net.minecraft.core.HolderLookup.Provider, net.minecraft.core.RegistryAccess, DynamicRegistryManagerSetupContext

@Internal public class DynamicRegistryManagerSetupContextImpl extends Object implements DynamicRegistryManagerSetupContext, net.minecraft.core.RegistryAccess
Represents the context implementation for the RegistryEvents.DYNAMIC_REGISTRY_SETUP event.

It is imperative that the passed registries are mutable to allow registration.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.quiltmc.qsl.frozenblock.core.registry.api.event.DynamicRegistryManagerSetupContext

    DynamicRegistryManagerSetupContext.RegistryMap

    Nested classes/interfaces inherited from interface net.minecraft.core.RegistryAccess

    net.minecraft.core.RegistryAccess.Frozen, net.minecraft.core.RegistryAccess.ImmutableRegistryAccess, net.minecraft.core.RegistryAccess.RegistryEntry<T>
  • Field Summary

    Fields inherited from interface net.minecraft.core.RegistryAccess

    EMPTY, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicRegistryManagerSetupContextImpl(net.minecraft.server.packs.resources.ResourceManager resourceManager, Stream<net.minecraft.core.WritableRegistry<?>> registries)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Stream<net.minecraft.core.RegistryAccess.RegistryEntry<?>>
     
    <E> @NotNull Optional<net.minecraft.core.Registry<E>>
    registry(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>> key)
     
    @NotNull net.minecraft.core.RegistryAccess
    Returns the registry access that is being currently setup.
    @NotNull net.minecraft.server.packs.resources.ResourceManager
    Returns the resource manager that is used to setup the dynamic registries.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.quiltmc.qsl.frozenblock.core.registry.api.event.DynamicRegistryManagerSetupContext

    getRegistries, monitor, register, withRegistries

    Methods inherited from interface net.minecraft.core.HolderLookup.Provider

    asGetterLookup, lookupOrThrow

    Methods inherited from interface net.minecraft.core.RegistryAccess

    allRegistriesLifecycle, freeze, lookup, registryOrThrow
  • Constructor Details

    • DynamicRegistryManagerSetupContextImpl

      public DynamicRegistryManagerSetupContextImpl(net.minecraft.server.packs.resources.ResourceManager resourceManager, Stream<net.minecraft.core.WritableRegistry<?>> registries)
  • Method Details

    • registryManager

      @NotNull public @NotNull net.minecraft.core.RegistryAccess registryManager()
      Description copied from interface: DynamicRegistryManagerSetupContext
      Returns the registry access that is being currently setup.
      Specified by:
      registryManager in interface DynamicRegistryManagerSetupContext
      Returns:
      the registry access that is being currently setup
    • resourceManager

      @NotNull public @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager()
      Description copied from interface: DynamicRegistryManagerSetupContext
      Returns the resource manager that is used to setup the dynamic registries.
      Specified by:
      resourceManager in interface DynamicRegistryManagerSetupContext
      Returns:
      the resource manager that is used to setup the dynamic registries
    • registry

      @NotNull public <E> @NotNull Optional<net.minecraft.core.Registry<E>> registry(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>> key)
      Specified by:
      registry in interface net.minecraft.core.RegistryAccess
    • registries

      @NotNull public @NotNull Stream<net.minecraft.core.RegistryAccess.RegistryEntry<?>> registries()
      Specified by:
      registries in interface net.minecraft.core.RegistryAccess