public class SimpleRegistry<T> extends MutableRegistry<T>
| Modifier and Type | Field and Description |
|---|---|
protected BiMap<Identifier,T> |
entries |
protected BiMap<class_5321<T>,T> |
field_25067 |
protected Int2ObjectBiMap<T> |
indexedEntries |
protected static Logger |
LOGGER |
private int |
nextId |
protected Object[] |
randomEntries |
ACTIVITY, AIR, ATTRIBUTES, BIOME, BIOME_SOURCE, BLOCK, BLOCK_ENTITY_TYPE, BLOCK_PLACER_TYPE, BLOCK_STATE_PROVIDER_TYPE, CARVER, CHUNK_GENERATOR, CHUNK_STATUS, CUSTOM_STAT, DECORATOR, DIMENSION_TYPE, DUMMY, EMPTY, ENCHANTMENT, ENTITY_TYPE, FEATURE, FEATURE_SIZE_TYPE, field_11137, field_11138, field_11141, field_11142, field_11143, field_11147, field_11148, field_11152, field_11153, field_11156, field_11157, field_11158, field_11160, field_16643, field_16644, field_16645, field_16792, field_16793, field_16794, field_17597, field_17598, field_18794, field_18795, field_18796, field_21445, field_21446, field_21447, field_21448, field_23398, field_23781, field_23782, field_24331, field_25096, field_25097, field_25100, field_25101, FLUID, FOLIAGE_PLACER_TYPE, ITEM, MEMORY_MODULE_TYPE, MENU, MOB_EFFECT, MOTIVE, NONE, PAINTING_MOTIVE, PARTICLE_TYPE, PIG, PLAINS, POINT_OF_INTEREST_TYPE, POS_RULE_TEST, POTION, RECIPE_SERIALIZER, RECIPE_TYPE, REGISTRIES, RULE_TEST, SCHEDULE, SCREEN_HANDLER, SENSOR_TYPE, SOUND_EVENT, STAT_TYPE, STATUS_EFFECT, STRUCTURE_FEATURE, STRUCTURE_PIECE, STRUCTURE_POOL_ELEMENT, STRUCTURE_PROCESSOR, SURFACE_BUILDER, TREE_DECORATOR_TYPE, TRUNK_PLACER_TYPE, UNEMPLOYED, VILLAGER_PROFESSION, VILLAGER_TYPE| Constructor and Description |
|---|
SimpleRegistry(class_5321<Registry<T>> class_5321,
com.mojang.serialization.Lifecycle lifecycle) |
| Modifier and Type | Method and Description |
|---|---|
<V extends T> |
add(class_5321<T> class_5321,
V entry) |
boolean |
containsId(Identifier id) |
T |
get(Identifier id) |
T |
get(int index) |
Identifier |
getId(T entry) |
Set<Identifier> |
getIds() |
Optional<T> |
getOrEmpty(Identifier id) |
T |
getRandom(Random random) |
int |
getRawId(T entry) |
Iterator<T> |
iterator() |
static <T> com.mojang.serialization.Codec<SimpleRegistry<T>> |
method_29098(class_5321<Registry<T>> class_5321,
com.mojang.serialization.Lifecycle lifecycle,
com.mojang.serialization.Codec<T> codec) |
T |
method_29107(class_5321<T> class_5321) |
boolean |
method_29111(int int2) |
boolean |
method_29112(class_5321<T> class_5321) |
class_5321<T> |
method_29113(T t) |
<V extends T> |
set(int rawId,
class_5321<T> class_5321,
V entry) |
toStringdecode, encode, keys, register, register, register, streamclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomapFlatMap, compoundList, deprecated, dispatch, dispatch, dispatchDeprecated, dispatchDeprecated, dispatchDeprecatedMap, dispatchDeprecatedMap, dispatchMap, dispatchMap, dispatchStable, dispatchStable, dispatchStableMap, dispatchStableMap, either, fieldOf, flatComapMap, flatXmap, list, listOf, mapEither, mapPair, mapResult, of, of, of, of, optionalField, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, pair, partialDispatch, partialDispatchMap, promotePartial, simpleMap, stable, unboundedMap, unit, unit, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withLifecycle, xmapcomap, empty, encodeStart, error, flatComapboxed, decode, error, flatMap, map, ofBoxed, ofSimple, ofTerminal, parse, parse, simple, terminalforEach, spliteratorprotected static final Logger LOGGER
protected final Int2ObjectBiMap<T> indexedEntries
protected final BiMap<Identifier,T> entries
protected final BiMap<class_5321<T>,T> field_25067
protected Object[] randomEntries
private int nextId
public SimpleRegistry(class_5321<Registry<T>> class_5321, com.mojang.serialization.Lifecycle lifecycle)
public <V extends T> V set(int rawId, class_5321<T> class_5321, V entry)
set in class MutableRegistry<T>public <V extends T> V add(class_5321<T> class_5321, V entry)
add in class MutableRegistry<T>public class_5321<T> method_29113(T t)
method_29113 in class Registry<T>@Nullable public T method_29107(@Nullable class_5321<T> class_5321)
method_29107 in class Registry<T>public Optional<T> getOrEmpty(@Nullable Identifier id)
getOrEmpty in class Registry<T>public Set<Identifier> getIds()
public boolean containsId(Identifier id)
containsId in class Registry<T>public boolean method_29112(class_5321<T> class_5321)
method_29112 in class Registry<T>public boolean method_29111(int int2)
method_29111 in class Registry<T>public static <T> com.mojang.serialization.Codec<SimpleRegistry<T>> method_29098(class_5321<Registry<T>> class_5321, com.mojang.serialization.Lifecycle lifecycle, com.mojang.serialization.Codec<T> codec)