Class DynamicRegistryAccess
java.lang.Object
com.thecsdev.commonmc.world.sandbox.DynamicRegistryAccess
- All Implemented Interfaces:
net.minecraft.core.HolderGetter.Provider, net.minecraft.core.HolderLookup.Provider, net.minecraft.core.RegistryAccess
@Internal
public final class DynamicRegistryAccess
extends Object
implements net.minecraft.core.RegistryAccess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classGenericBootstrapContextimplementation that works with anyMappedRegistry.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
FieldsModifier and TypeFieldDescriptionstatic final DynamicRegistryAccessStaticDynamicRegistryAccessinstance that was bootstrapped usingbootstrapLevel().Fields inherited from interface net.minecraft.core.RegistryAccess
EMPTY, LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBootstraps registries necessary for a vanillaLevelinstance.final <E> @NotNull Optional<net.minecraft.core.Registry<E>> lookup(@NonNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>> resourceKey) final <E> @NotNull Optional<net.minecraft.core.WritableRegistry<E>> lookupM(@NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>> resourceKey) final @NotNull Stream<net.minecraft.core.RegistryAccess.RegistryEntry<?>> Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.core.HolderGetter.Provider
get, get, getOrThrow, getOrThrowMethods inherited from interface net.minecraft.core.HolderLookup.Provider
allRegistriesLifecycle, createSerializationContext, listRegistriesMethods inherited from interface net.minecraft.core.RegistryAccess
freeze, listRegistryKeys, lookupOrThrow
-
Field Details
-
LEVEL
StaticDynamicRegistryAccessinstance that was bootstrapped usingbootstrapLevel(). Used for creatingLevelinstances.
-
-
Constructor Details
-
DynamicRegistryAccess
public DynamicRegistryAccess()
-
-
Method Details
-
lookupM
@NotNull public final <E> @NotNull Optional<net.minecraft.core.WritableRegistry<E>> lookupM(@NotNull @NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>> resourceKey) -
lookup
@NotNull public final <E> @NotNull Optional<net.minecraft.core.Registry<E>> lookup(@NonNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>> resourceKey) - Specified by:
lookupin interfacenet.minecraft.core.HolderGetter.Provider- Specified by:
lookupin interfacenet.minecraft.core.HolderLookup.Provider- Specified by:
lookupin interfacenet.minecraft.core.RegistryAccess
-
registries
@NotNull public final @NotNull Stream<net.minecraft.core.RegistryAccess.RegistryEntry<?>> registries()- Specified by:
registriesin interfacenet.minecraft.core.RegistryAccess
-
bootstrapLevel
Bootstraps registries necessary for a vanillaLevelinstance.
-