public class ClearableRegistry<T> extends MutableRegistry<T>
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, MEMORY_MODULE_TYPE, MENU, MOTIVE, PARTICLE_TYPE, POINT_OF_INTEREST_TYPE, POTION, RECIPE_SERIALIZER, RECIPE_TYPE, 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
コンストラクタと説明 |
---|
ClearableRegistry(ResourceLocation name) |
ClearableRegistry(ResourceLocation name,
java.lang.Class<T> superType) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
clear() |
boolean |
containsKey(ResourceLocation key) |
T |
getByValue(int id) |
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.
|
int |
getNextId() |
T |
getOrDefault(ResourceLocation key) |
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 key,
V value) |
<V extends T> |
register(ResourceLocation key,
V value) |
public ClearableRegistry(ResourceLocation name)
public ClearableRegistry(ResourceLocation name, java.lang.Class<T> superType)
@Nullable public ResourceLocation getKey(T value)
Registry
@Nullable public int getId(T value)
Registry
@Nullable public T getByValue(int id)
public java.util.Iterator<T> iterator()
@Nullable public T getOrDefault(ResourceLocation key)
getOrDefault
クラス内 Registry<T>
public <V extends T> V register(int id, ResourceLocation key, V value)
register
クラス内 MutableRegistry<T>
public <V extends T> V register(ResourceLocation key, V value)
register
クラス内 MutableRegistry<T>
public java.util.Set<ResourceLocation> keySet()
Registry
public boolean isEmpty()
isEmpty
クラス内 MutableRegistry<T>
public boolean containsKey(ResourceLocation key)
containsKey
クラス内 Registry<T>
public void clear()
public int getNextId()