public class SimpleRegistry<T> extends MutableRegistry<T>
修飾子とタイプ | フィールドと説明 |
---|---|
protected static org.apache.logging.log4j.Logger |
LOGGER0 |
protected com.google.common.collect.BiMap<ResourceLocation,T> |
registryObjects |
protected IntIdentityHashBiMap<T> |
underlyingIntegerMap
The backing store that maps Integers to objects.
|
protected java.lang.Object[] |
values |
ACTIVITY, BIOME, BIOME_SOURCE_TYPE, BLOCK, BLOCK_ENTITY_TYPE, BLOCK_PLACER_TYPE, BLOCK_STATE_PROVIDER_TYPE, CARVER, CHUNK_GENERATOR_TYPE, CHUNK_STATUS, CUSTOM_STAT, DECORATOR, DIMENSION_TYPE, EFFECTS, ENCHANTMENT, ENTITY_TYPE, FEATURE, FLUID, FOLIAGE_PLACER_TYPE, ITEM, LOGGER, MEMORY_MODULE_TYPE, MENU, MOTIVE, PARTICLE_TYPE, POINT_OF_INTEREST_TYPE, POTION, RECIPE_SERIALIZER, RECIPE_TYPE, REGISTRY, RULE_TEST, SCHEDULE, SENSOR_TYPE, SOUND_EVENT, STATS, STRUCTURE_FEATURE, STRUCTURE_PIECE, STRUCTURE_POOL_ELEMENT, STRUCTURE_PROCESSOR, SURFACE_BUILDER, TREE_DECORATOR_TYPE, VILLAGER_PROFESSION, VILLAGER_TYPE
コンストラクタと説明 |
---|
SimpleRegistry() |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
containsKey(ResourceLocation name) |
T |
getByValue(int value) |
int |
getId(T value)
Gets the integer ID we use to identify the given object.
|
ResourceLocation |
getKey(T value)
Gets the name we use to identify the given object.
|
T |
getOrDefault(ResourceLocation name) |
T |
getRandom(java.util.Random random) |
java.util.Optional<T> |
getValue(ResourceLocation key)
Gets the value assosiated by the key.
|
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
java.util.Set<ResourceLocation> |
keySet()
Gets all the keys recognized by this registry.
|
<V extends T> |
register(int id,
ResourceLocation name,
V instance) |
<V extends T> |
register(ResourceLocation name,
V instance) |
protected static final org.apache.logging.log4j.Logger LOGGER0
protected final IntIdentityHashBiMap<T> underlyingIntegerMap
protected final com.google.common.collect.BiMap<ResourceLocation,T> registryObjects
protected java.lang.Object[] values
public <V extends T> V register(int id, ResourceLocation name, V instance)
register
クラス内 MutableRegistry<T>
public <V extends T> V register(ResourceLocation name, V instance)
register
クラス内 MutableRegistry<T>
@Nullable public ResourceLocation getKey(T value)
public int getId(@Nullable T value)
@Nullable public T getByValue(int value)
public java.util.Iterator<T> iterator()
@Nullable public T getOrDefault(@Nullable ResourceLocation name)
getOrDefault
クラス内 Registry<T>
public java.util.Optional<T> getValue(@Nullable ResourceLocation key)
public java.util.Set<ResourceLocation> keySet()
public boolean isEmpty()
isEmpty
クラス内 MutableRegistry<T>
public boolean containsKey(ResourceLocation name)
containsKey
クラス内 Registry<T>