net.minecraft.core

public class MappedRegistry<T>

extends WritableRegistry<T>

All mapped superinterfaces:

IdMap

hh
net.minecraft.core.MappedRegistry
net.minecraft.class_2370
net.minecraft.util.registry.SimpleRegistry
net.minecraft.src.C_4700_
net.minecraft.core.RegistryMaterials

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
bR
LOGGER
field_36635
field_36635
f_211050_
private final it.unimi.dsi.fastutil.objects.ObjectList<Holder$Reference<T>>
bS
byId
field_26682
rawIdToEntry
f_122672_
private final it.unimi.dsi.fastutil.objects.Object2IntMap<T>
bT
toId
field_26683
entryToRawId
f_122673_
private final Map<ResourceLocation, Holder$Reference<T>>
bU
byLocation
field_11107
idToEntry
f_205841_
private final Map<ResourceKey<T>, Holder$Reference<T>>
bV
byKey
field_25067
keyToEntry
f_205842_
private final Map<T, Holder$Reference<T>>
bW
byValue
field_36461
valueToEntry
f_205843_
private final Map<T, com.mojang.serialization.Lifecycle>
bX
lifecycles
field_26731
entryToLifecycle
f_122676_
private com.mojang.serialization.Lifecycle
bY
elementsLifecycle
field_26732
lifecycle
f_122677_
private volatile Map<TagKey<T>, HolderSet$Named<T>>
bZ
tags
field_36462
tagToEntryList
f_205844_
private boolean
ca
frozen
field_36463
frozen
f_205845_
private final Function<T, Holder$Reference<T>>
cb
customHolderProvider
field_36464
valueToEntryFunction
f_205846_
private Map<T, Holder$Reference<T>>
cc
intrusiveHolderCache
field_36465
unfrozenValueToEntry
f_205847_
private List<Holder$Reference<T>>
cd
holdersInOrder
field_36634
cachedEntries
f_211051_
private int
ce
nextId
field_11109
nextId
f_122678_

Constructor summary

ModifierConstructor
public (ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, Function<T, Holder$Reference<T>> valueToEntryFunction)

Method summary

Modifier and TypeMethod
private List<Holder$Reference<T>>
a()
holdersInOrder()
method_40561()
getEntries()
m_211053_()
private void
i(aba<T> arg0)
validateWrite(ResourceKey<T> arg0)
method_40274(class_5321<T> arg0)
assertNotFrozen(RegistryKey<T> key)
m_205921_(C_5264_<T> arg0)
public Holder<T>
a(int arg0, aba<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
registerMapping(int arg0, ResourceKey<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
method_10273(int arg0, class_5321<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
set(int arg0, RegistryKey<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
m_203704_(int p_205854_, C_5264_<T> p_205855_, T p_205856_, com.mojang.serialization.Lifecycle arg3)
private Holder<T>
a(int arg0, aba<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3, boolean arg4)
registerMapping(int arg0, ResourceKey<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3, boolean arg4)
method_31051(int arg0, class_5321<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3, boolean arg4)
set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle, boolean checkDuplicateKeys)
m_205857_(int p_205859_, C_5264_<T> p_205860_, T p_205861_, com.mojang.serialization.Lifecycle p_205862_, boolean arg4)
public Holder<T>
a(aba<T> arg0, T arg1, com.mojang.serialization.Lifecycle arg2)
register(ResourceKey<T> arg0, T arg1, com.mojang.serialization.Lifecycle arg2)
method_10272(class_5321<T> arg0, T arg1, com.mojang.serialization.Lifecycle arg2)
add(RegistryKey<T> arg0, T arg1, com.mojang.serialization.Lifecycle arg2)
m_203505_(C_5264_<T> p_205892_, T p_205893_, com.mojang.serialization.Lifecycle arg2)
public Holder<T>
a(OptionalInt arg0, aba<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
registerOrOverride(OptionalInt arg0, ResourceKey<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
method_31062(OptionalInt arg0, class_5321<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
replace(OptionalInt arg0, RegistryKey<T> arg1, T arg2, com.mojang.serialization.Lifecycle arg3)
m_203384_(OptionalInt p_205885_, C_5264_<T> p_205886_, T p_205887_, com.mojang.serialization.Lifecycle arg3)
public ResourceLocation
b(T arg0)
getKey(T arg0)
method_10221(T arg0)
getId(T arg0)
m_7981_(T arg0)
public Optional<ResourceKey<T>>
c(T arg0)
getResourceKey(T arg0)
method_29113(T arg0)
getKey(T arg0)
m_7854_(T arg0)
public int
a(T arg0)
getId(T arg0)
method_10206(T arg0)
getRawId(T arg0)
m_7447_(T arg0)
public T
a(aba<T> arg0)
get(ResourceKey<T> arg0)
method_29107(class_5321<T> arg0)
get(RegistryKey<T> arg0)
m_6246_(C_5264_<T> arg0)
public T
a(int arg0)
byId(int arg0)
method_10200(int arg0)
get(int arg0)
m_7942_(int arg0)
public Optional<Holder<T>>
c(int arg0)
getHolder(int arg0)
method_40265(int arg0)
getEntry(int arg0)
m_203300_(int arg0)
public Optional<Holder<T>>
b(aba<T> arg0)
getHolder(ResourceKey<T> arg0)
method_40264(class_5321<T> arg0)
getEntry(RegistryKey<T> arg0)
m_203636_(C_5264_<T> arg0)
public Holder<T>
c(aba<T> arg0)
getOrCreateHolderOrThrow(ResourceKey<T> arg0)
method_44298(class_5321<T> arg0)
getOrCreateEntry(RegistryKey<T> arg0)
m_214121_(C_5264_<T> arg0)
public com.mojang.serialization.DataResult<Holder<T>>
d(aba<T> arg0)
getOrCreateHolder(ResourceKey<T> arg0)
method_40268(class_5321<T> arg0)
getOrCreateEntryDataResult(RegistryKey<T> arg0)
m_214185_(C_5264_<T> arg0)
public int
b()
size()
method_10204()
size()
m_13562_()
public com.mojang.serialization.Lifecycle
d(T arg0)
lifecycle(T arg0)
method_31139(T arg0)
getEntryLifecycle(T arg0)
m_6228_(T arg0)
public com.mojang.serialization.Lifecycle
c()
elementsLifecycle()
method_31138()
getLifecycle()
m_7837_()
public Iterator<T>
iterator()
iterator()
iterator()
public T
a(abb arg0)
get(ResourceLocation arg0)
method_10223(class_2960 arg0)
get(Identifier arg0)
m_7745_(C_5265_ arg0)
private static <T> T
a(hc$c<T> arg0)
getValueFromNullable(Holder$Reference<T> arg0)
method_40253(class_6880$class_6883<T> arg0)
getValue(RegistryEntry$Reference<T> entry)
m_205865_(C_203231_<T> p_205866_)
public Set<ResourceLocation>
d()
keySet()
method_10235()
getIds()
m_6566_()
public Set<ResourceKey<T>>
e()
registryKeySet()
method_42021()
getKeys()
m_214010_()
public Set<Map$Entry<ResourceKey<T>, T>>
f()
entrySet()
method_29722()
getEntrySet()
m_6579_()
public Stream<Holder$Reference<T>>
g()
holders()
method_40270()
streamEntries()
m_203611_()
public boolean
a(akz<T> arg0)
isKnownTagName(TagKey<T> arg0)
method_40252(class_6862<T> arg0)
containsTag(TagKey<T> arg0)
m_203658_(C_203208_<T> arg0)
public Stream<com.mojang.datafixers.util.Pair<TagKey<T>, HolderSet$Named<T>>>
h()
getTags()
method_40272()
streamTagsAndEntries()
m_203612_()
public HolderSet$Named<T>
b(akz<T> arg0)
getOrCreateTag(TagKey<T> arg0)
method_40260(class_6862<T> arg0)
getOrCreateEntryList(TagKey<T> arg0)
m_203561_(C_203208_<T> arg0)
private HolderSet$Named<T>
e(akz<T> arg0)
createTag(TagKey<T> arg0)
method_40562(class_6862<T> arg0)
createNamedEntryList(TagKey<T> tag)
m_211067_(C_203208_<T> arg0)
public Stream<TagKey<T>>
i()
getTagNames()
method_40273()
streamTags()
m_203613_()
public boolean
j()
isEmpty()
method_35863()
isEmpty()
m_142427_()
public Optional<Holder<T>>
a(amn arg0)
getRandom(RandomSource arg0)
method_10240(class_5819 arg0)
getRandom(Random arg0)
m_213642_(C_212974_ arg0)
public boolean
c(abb arg0)
containsKey(ResourceLocation arg0)
method_10250(class_2960 arg0)
containsId(Identifier arg0)
m_7804_(C_5265_ arg0)
public boolean
e(aba<T> arg0)
containsKey(ResourceKey<T> arg0)
method_35842(class_5321<T> arg0)
contains(RegistryKey<T> arg0)
m_142003_(C_5264_<T> arg0)
public Registry<T>
k()
freeze()
method_40276()
freeze()
m_203521_()
public Holder$Reference<T>
e(T arg0)
createIntrusiveHolder(T arg0)
method_40269(T arg0)
createEntry(T arg0)
m_203693_(T arg0)
public Optional<HolderSet$Named<T>>
c(akz<T> arg0)
getTag(TagKey<T> arg0)
method_40266(class_6862<T> arg0)
getEntryList(TagKey<T> arg0)
m_203431_(C_203208_<T> arg0)
public void
a(Map<akz<T>, List<hc<T>>> arg0)
bindTags(Map<TagKey<T>, List<Holder<T>>> arg0)
method_40257(Map<class_6862<T>, List<class_6880<T>>> arg0)
populateTags(Map<TagKey<T>, List<RegistryEntry<T>>> arg0)
m_203652_(Map<C_203208_<T>, List<C_203228_<T>>> arg0)
public void
l()
resetTags()
method_40278()
clearTags()
m_203635_()