Package net.minecraft.core
Class DefaultedMappedRegistry<T>
java.lang.Object
net.minecraft.core.MappedRegistry<T>
net.minecraft.core.DefaultedMappedRegistry<T>
- All Implemented Interfaces:
com.mojang.serialization.Keyable
,Iterable<T>
,DefaultedRegistry<T>
,IdMap<T>
,Registry<T>
,WritableRegistry<T>
-
Field Summary
Fields inherited from class net.minecraft.core.MappedRegistry
key, unregisteredIntrusiveHolders
-
Constructor Summary
ConstructorDescriptionDefaultedMappedRegistry
(String p_260196_, ResourceKey<? extends Registry<T>> p_259440_, com.mojang.serialization.Lifecycle p_260260_, boolean p_259808_) -
Method Summary
Modifier and TypeMethodDescriptionbyId
(int p_259534_) get
(ResourceLocation p_260004_) int
getOptional
(ResourceLocation p_260078_) getRandom
(RandomSource p_260255_) registerMapping
(int p_259787_, ResourceKey<T> p_259677_, T p_259430_, com.mojang.serialization.Lifecycle p_259516_) Methods inherited from class net.minecraft.core.MappedRegistry
asLookup, bindTags, containsKey, containsKey, createIntrusiveHolder, createRegistrationLookup, entrySet, freeze, get, getHolder, getHolder, getKnownRegistries, getOrCreateHolderOrThrow, getOrCreateTag, getResourceKey, getTag, getTagNames, getTags, holderOwner, holders, isEmpty, iterator, key, keySet, lifecycle, markKnown, register, registryKeySet, registryLifecycle, resetTags, size, toString, unfreeze, wrapAsHolder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.IdMap
byIdOrThrow, 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, getHolderOrThrow, getOptional, getOrCreateTag, getOrThrow, getResourceKey, getTag, getTagNames, getTagOrEmpty, getTags, holderByNameCodec, holderOwner, holders, key, keys, keySet, lifecycle, registryKeySet, registryLifecycle, resetTags, stream, wrapAsHolder
-
Field Details
-
defaultKey
-
defaultValue
-
-
Constructor Details
-
DefaultedMappedRegistry
public DefaultedMappedRegistry(String p_260196_, ResourceKey<? extends Registry<T>> p_259440_, com.mojang.serialization.Lifecycle p_260260_, boolean p_259808_)
-
-
Method Details
-
registerMapping
public Holder.Reference<T> registerMapping(int p_259787_, ResourceKey<T> p_259677_, T p_259430_, com.mojang.serialization.Lifecycle p_259516_) - Specified by:
registerMapping
in interfaceWritableRegistry<T>
- Overrides:
registerMapping
in classMappedRegistry<T>
-
getId
-
getKey
- Specified by:
getKey
in interfaceDefaultedRegistry<T>
- Specified by:
getKey
in interfaceRegistry<T>
- Overrides:
getKey
in classMappedRegistry<T>
-
get
- Specified by:
get
in interfaceDefaultedRegistry<T>
- Specified by:
get
in interfaceRegistry<T>
- Overrides:
get
in classMappedRegistry<T>
-
getOptional
- Specified by:
getOptional
in interfaceRegistry<T>
-
byId
- Specified by:
byId
in interfaceDefaultedRegistry<T>
- Specified by:
byId
in interfaceIdMap<T>
- Overrides:
byId
in classMappedRegistry<T>
-
getRandom
-
getDefaultKey
- Specified by:
getDefaultKey
in interfaceDefaultedRegistry<T>
-