Package net.minecraftforge.registries
Class NamespacedDefaultedWrapper<T>
java.lang.Object
net.minecraft.core.MappedRegistry<T>
net.minecraftforge.registries.NamespacedWrapper<T>
net.minecraftforge.registries.NamespacedDefaultedWrapper<T>
- All Implemented Interfaces:
com.mojang.serialization.Keyable
,Iterable<T>
,DefaultedRegistry<T>
,IdMap<T>
,Registry<T>
,WritableRegistry<T>
,ILockableRegistry
-
Field Summary
Modifier and TypeFieldDescriptionprivate Holder.Reference
<T> private final ResourceLocation
private final ForgeRegistry
<T> Fields inherited from class net.minecraftforge.registries.NamespacedWrapper
locked, LOGGER, registryLifecycle
Fields inherited from class net.minecraft.core.MappedRegistry
unregisteredIntrusiveHolders
-
Constructor Summary
ConstructorDescriptionNamespacedDefaultedWrapper
(ForgeRegistry<T> fowner, Function<T, Holder.Reference<T>> intrusiveHolderCallback, RegistryManager stage) -
Method Summary
Modifier and TypeMethodDescriptionget
(@Nullable ResourceLocation name) getRandom
(RandomSource rand) (package private) Holder.Reference
<T> onAdded
(RegistryManager stage, int id, ResourceKey<T> key, T newValue, T oldValue) Methods inherited from class net.minecraftforge.registries.NamespacedWrapper
addOptionalTag, bindTags, byId, containsKey, containsKey, createIntrusiveHolder, createRegistrationLookup, entrySet, freeze, get, getHolder, getHolder, getHolder, getHolder, getId, getKey, getOptional, getOrCreateHolderOrThrow, getOrCreateTag, getResourceKey, getTag, getTagNames, getTags, holders, isEmpty, isFrozen, isIntrusive, iterator, keySet, lock, register, registrationInfo, registryKeySet, registryLifecycle, resetTags, size, unfreeze, validateWrite, validateWrite, wrapAsHolder
Methods inherited from class net.minecraft.core.MappedRegistry
asLookup, getKnownRegistries, holderOwner, key, markKnown, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.DefaultedRegistry
byId, getKey
Methods inherited from interface net.minecraft.core.IdMap
byIdOrThrow, getIdOrThrow, size
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface net.minecraft.core.Registry
asHolderIdMap, asLookup, asTagAddingLookup, bindTags, byNameCodec, containsKey, containsKey, createIntrusiveHolder, entrySet, freeze, get, getHolder, getHolder, getHolder, getHolderOrThrow, getId, getOptional, getOptional, getOrCreateTag, getOrThrow, getRandomElementOf, getResourceKey, getTag, getTagNames, getTagOrEmpty, getTags, holderByNameCodec, holderOwner, holders, key, keys, keySet, registrationInfo, registryKeySet, registryLifecycle, resetTags, stream, wrapAsHolder
-
Field Details
-
delegate
-
defaultKey
-
defaultHolder
-
-
Constructor Details
-
NamespacedDefaultedWrapper
NamespacedDefaultedWrapper(ForgeRegistry<T> fowner, Function<T, Holder.Reference<T>> intrusiveHolderCallback, RegistryManager stage)
-
-
Method Details
-
get
- Specified by:
get
in interfaceDefaultedRegistry<T>
- Specified by:
get
in interfaceRegistry<T>
- Overrides:
get
in classNamespacedWrapper<T>
-
getRandom
-
getDefaultKey
- Specified by:
getDefaultKey
in interfaceDefaultedRegistry<T>
-
onAdded
@Nullable Holder.Reference<T> onAdded(RegistryManager stage, int id, ResourceKey<T> key, T newValue, T oldValue) - Overrides:
onAdded
in classNamespacedWrapper<T>
-