Class PatchedRegistry<T>
java.lang.Object
net.minecraft.core.registries.PatchedRegistry<T>
- All Implemented Interfaces:
HolderGetter<T>, HolderLookup<T>, HolderLookup.RegistryLookup<T>, HolderOwner<T>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface HolderLookup
HolderLookup.Provider, HolderLookup.RegistryLookup<T>Nested classes/interfaces inherited from interface HolderLookup.RegistryLookup
HolderLookup.RegistryLookup.Delegate<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceKey<T>, Holder.Reference<T>> private final ResourceKey<? extends Registry<? extends T>> private final com.mojang.serialization.Lifecycle -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePatchedRegistry(ResourceKey<? extends Registry<? extends T>> key, com.mojang.serialization.Lifecycle lifecycle) -
Method Summary
Modifier and TypeMethodDescriptionstatic HolderLookup.ProviderapplyPatches(HolderLookup.Provider context, HolderLookup.Provider baseRegistries, HolderLookup.Provider patchRegistries, Cloner.Factory clonerFactory, Set<ResourceKey<? extends Registry<?>>> registriesToClone) private static <T> HolderLookup.RegistryLookup<T> createLazyFullPatchedRegistries(Cloner.Factory clonerFactory, ResourceKey<? extends Registry<? extends T>> registryKey, HolderLookup.Provider baseProvider, HolderLookup.Provider patchProvider, org.apache.commons.lang3.mutable.MutableObject<HolderLookup.Provider> clonedRegistriesProvider) get(ResourceKey<T> id) ResourceKey<? extends Registry<? extends T>> key()listTags()com.mojang.serialization.LifecycleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HolderGetter
getOrThrow, getOrThrow, getRandomElementOfMethods inherited from interface HolderLookup
listElementIds, listTagIdsMethods inherited from interface HolderLookup.RegistryLookup
filterElements, filterFeatures, getData, getDataMapMethods inherited from interface HolderOwner
canSerialize
-
Field Details
-
key
-
lifecycle
private final com.mojang.serialization.Lifecycle lifecycle -
entries
-
-
Constructor Details
-
PatchedRegistry
private PatchedRegistry(ResourceKey<? extends Registry<? extends T>> key, com.mojang.serialization.Lifecycle lifecycle)
-
-
Method Details
-
key
- Specified by:
keyin interfaceHolderLookup.RegistryLookup<T>
-
registryLifecycle
public com.mojang.serialization.Lifecycle registryLifecycle()- Specified by:
registryLifecyclein interfaceHolderLookup.RegistryLookup<T>
-
listElements
- Specified by:
listElementsin interfaceHolderLookup<T>
-
get
- Specified by:
getin interfaceHolderGetter<T>
-
listTags
- Specified by:
listTagsin interfaceHolderLookup<T>
-
get
- Specified by:
getin interfaceHolderGetter<T>
-
createLazyFullPatchedRegistries
private static <T> HolderLookup.RegistryLookup<T> createLazyFullPatchedRegistries(Cloner.Factory clonerFactory, ResourceKey<? extends Registry<? extends T>> registryKey, HolderLookup.Provider baseProvider, HolderLookup.Provider patchProvider, org.apache.commons.lang3.mutable.MutableObject<HolderLookup.Provider> clonedRegistriesProvider) -
applyPatches
public static HolderLookup.Provider applyPatches(HolderLookup.Provider context, HolderLookup.Provider baseRegistries, HolderLookup.Provider patchRegistries, Cloner.Factory clonerFactory, Set<ResourceKey<? extends Registry<?>>> registriesToClone)
-