class NamespacedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamespaced<ResourceLocation,V> implements ILockableRegistry
Modifier and Type | Class and Description |
---|---|
static class |
NamespacedWrapper.Factory<V extends IForgeRegistryEntry<V>> |
Modifier and Type | Field and Description |
---|---|
private ForgeRegistry<V> |
delegate |
private boolean |
locked |
inverseObjectRegistry, underlyingIntegerMap
registryObjects
Constructor and Description |
---|
NamespacedWrapper(ForgeRegistry<V> owner) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(ResourceLocation key) |
int |
getIDForObject(V value) |
java.util.Set<ResourceLocation> |
getKeys() |
ResourceLocation |
getNameForObject(V value) |
V |
getObject(ResourceLocation name) |
V |
getObjectById(int id) |
V |
getRandomObject(java.util.Random random) |
java.util.Iterator<V> |
iterator() |
void |
lock() |
void |
putObject(ResourceLocation key,
V value) |
void |
register(int id,
ResourceLocation key,
V value) |
createUnderlyingMap
private boolean locked
private ForgeRegistry<V extends IForgeRegistryEntry<V>> delegate
public NamespacedWrapper(ForgeRegistry<V> owner)
public void register(int id, ResourceLocation key, V value)
register
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
public void putObject(ResourceLocation key, V value)
putObject
in interface IRegistry<ResourceLocation,V extends IForgeRegistryEntry<V>>
putObject
in class RegistrySimple<ResourceLocation,V extends IForgeRegistryEntry<V>>
@Nullable public V getObject(@Nullable ResourceLocation name)
getObject
in interface IRegistry<ResourceLocation,V extends IForgeRegistryEntry<V>>
getObject
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
@Nullable public ResourceLocation getNameForObject(V value)
getNameForObject
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
public boolean containsKey(ResourceLocation key)
containsKey
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
public int getIDForObject(@Nullable V value)
getIDForObject
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
@Nullable public V getObjectById(int id)
getObjectById
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
public java.util.Iterator<V> iterator()
iterator
in interface java.lang.Iterable<V extends IForgeRegistryEntry<V>>
iterator
in class RegistryNamespaced<ResourceLocation,V extends IForgeRegistryEntry<V>>
public java.util.Set<ResourceLocation> getKeys()
getKeys
in interface IRegistry<ResourceLocation,V extends IForgeRegistryEntry<V>>
getKeys
in class RegistrySimple<ResourceLocation,V extends IForgeRegistryEntry<V>>
@Nullable public V getRandomObject(java.util.Random random)
getRandomObject
in class RegistrySimple<ResourceLocation,V extends IForgeRegistryEntry<V>>
public void lock()
lock
in interface ILockableRegistry