class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry<T> implements ILockableRegistry
Modifier and Type | Class and Description |
---|---|
static class |
NamespacedWrapper.Factory<V extends IForgeRegistryEntry<V>> |
Modifier and Type | Field and Description |
---|---|
private ForgeRegistry<T> |
delegate |
private boolean |
locked |
private static org.apache.logging.log4j.Logger |
LOGGER |
LOGGER0, registryObjects, underlyingIntegerMap, 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, 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
Constructor and Description |
---|
NamespacedWrapper(ForgeRegistry<T> owner) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(ResourceLocation key) |
T |
getByValue(int id) |
int |
getId(T value) |
ResourceLocation |
getKey(T value) |
T |
getOrDefault(ResourceLocation name) |
T |
getRandom(java.util.Random random) |
java.util.Optional<T> |
getValue(ResourceLocation name) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
java.util.Set<ResourceLocation> |
keySet() |
void |
lock() |
<V extends T> |
register(int id,
ResourceLocation key,
V value) |
<R extends T> |
register(ResourceLocation key,
R value) |
register, register, register, stream
private static final org.apache.logging.log4j.Logger LOGGER
private boolean locked
private ForgeRegistry<T extends IForgeRegistryEntry<T>> delegate
public NamespacedWrapper(ForgeRegistry<T> owner)
public <V extends T> V register(int id, ResourceLocation key, V value)
register
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public <R extends T> R register(ResourceLocation key, R value)
register
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
@Nullable public T getOrDefault(@Nullable ResourceLocation name)
getOrDefault
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public java.util.Optional<T> getValue(@Nullable ResourceLocation name)
getValue
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
@Nullable public ResourceLocation getKey(T value)
getKey
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public boolean containsKey(ResourceLocation key)
containsKey
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public int getId(@Nullable T value)
getId
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
@Nullable public T getByValue(int id)
getByValue
in interface IObjectIntIterable<T extends IForgeRegistryEntry<T>>
getByValue
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T extends IForgeRegistryEntry<T>>
iterator
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public java.util.Set<ResourceLocation> keySet()
keySet
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
@Nullable public T getRandom(java.util.Random random)
getRandom
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public boolean isEmpty()
isEmpty
in class SimpleRegistry<T extends IForgeRegistryEntry<T>>
public void lock()
lock
in interface ILockableRegistry