net.minecraft.registry

public class SimpleDefaultedRegistry<T>

extends SimpleRegistry<T> implements DefaultedRegistry<T>

All mapped superinterfaces:

MutableRegistry, Registry, IndexedIterable, RegistryWrapper$Impl, RegistryWrapper, RegistryEntryLookup, RegistryEntryOwner, DefaultedRegistry

net.minecraft.core.DefaultedMappedRegistry
net.minecraft.class_2348
net.minecraft.registry.SimpleDefaultedRegistry

Field summary

Modifier and TypeField
private final Identifier
defaultKey
field_11014
defaultId
private RegistryEntry$Reference<T>
defaultValue
field_11015
defaultEntry

Constructor summary

ModifierConstructor
public (String defaultId, RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, boolean intrusive)

Method summary

Modifier and TypeMethod
public RegistryEntry$Reference<T>
register(ResourceKey<T> key, T value, RegistrationInfo registrationInfo)
method_10272(class_5321<T> arg0, T arg1, class_9248 arg2)
add(RegistryKey<T> arg0, T arg1, RegistryEntryInfo arg2)
public int
getId(T thing)
method_10206(T arg0)
getRawId(T arg0)
public Identifier
getKey(T thing)
method_10221(T arg0)
getId(T arg0)
public T
getValue(Identifier key)
method_63535(class_2960 arg0)
get(Identifier arg0)
public Optional<T>
getOptional(Identifier key)
method_17966(class_2960 arg0)
getOptionalValue(Identifier arg0)
public Optional<RegistryEntry$Reference<T>>
getAny()
method_60385()
getDefaultEntry()
public T
byId(int id)
method_10200(int arg0)
get(int arg0)
public Optional<RegistryEntry$Reference<T>>
getRandom(RandomSource random)
method_10240(class_5819 arg0)
getRandom(Random arg0)
public Identifier
getDefaultKey()
method_10137()
getDefaultId()
private Optional
lambda$getRandom$0()
method_40219()
method_40219()