public class RegistryNamespacedDefaultedByKey<K,V> extends RegistryNamespaced<K,V>
Modifier and Type | Field and Description |
---|---|
private V |
defaultValue
The default value for this registry, retrurned in the place of a null value.
|
private K |
defaultValueKey
The key of the default value.
|
inverseObjectRegistry, underlyingIntegerMap
registryObjects
Constructor and Description |
---|
RegistryNamespacedDefaultedByKey(K p_i46017_1_) |
Modifier and Type | Method and Description |
---|---|
V |
getObject(K name) |
V |
getObjectById(int id)
Gets the object identified by the given ID.
|
void |
register(int id,
K p_177775_2_,
V p_177775_3_) |
void |
validateKey()
validates that this registry's key is non-null
|
containsKey, createUnderlyingMap, getIDForObject, getNameForObject, iterator
getKeys, putObject
private final K defaultValueKey
private V defaultValue
public RegistryNamespacedDefaultedByKey(K p_i46017_1_)
public void register(int id, K p_177775_2_, V p_177775_3_)
register
in class RegistryNamespaced<K,V>
public void validateKey()
public V getObjectById(int id)
getObjectById
in class RegistryNamespaced<K,V>