K - the keyV - the valuepublic class SimpleMappedRegistry<K,V> extends AbstractMappedRegistry<K,V,Map<K,V>>
AbstractMappedRegistry with Map as the defined type. Unlike
MappedRegistry, this registry does not support specifying your own Map class,
and only permits operations the Map interface does, unless you manually cast.| Modifier | Constructor and Description |
|---|---|
protected |
SimpleMappedRegistry(I input,
RegistryLoader<I,Map<K,V>> registryLoader) |
| Modifier and Type | Method and Description |
|---|---|
static <I,K,V> SimpleMappedRegistry<K,V> |
create(I input,
RegistryLoader<I,Map<K,V>> registryLoader)
Creates a new mapped registry with the given
RegistryLoader and input. |
static <I,K,V> SimpleMappedRegistry<K,V> |
create(I input,
Supplier<RegistryLoader<I,Map<K,V>>> registryLoader)
Creates a new mapped registry with the given
RegistryLoader and input. |
static <I,K,V> SimpleMappedRegistry<K,V> |
create(RegistryLoader<I,Map<K,V>> registryLoader)
Creates a new mapped registry with the given
RegistryLoader. |
static <I,K,V> SimpleMappedRegistry<K,V> |
create(Supplier<RegistryLoader<I,Map<K,V>>> registryLoader)
Creates a new mapped registry with the given
RegistryLoader supplier. |
get, getOrDefault, registerprotected SimpleMappedRegistry(I input,
RegistryLoader<I,Map<K,V>> registryLoader)
public static <I,K,V> SimpleMappedRegistry<K,V> create(RegistryLoader<I,Map<K,V>> registryLoader)
RegistryLoader. The
input type is not specified here, meaning the loader return type is either
predefined, or the registry is populated at a later point.I - the inputK - the map keyV - the map valueregistryLoader - the registry loaderpublic static <I,K,V> SimpleMappedRegistry<K,V> create(I input, RegistryLoader<I,Map<K,V>> registryLoader)
RegistryLoader and input.I - the inputK - the map keyV - the map valueinput - the inputregistryLoader - the registry loaderpublic static <I,K,V> SimpleMappedRegistry<K,V> create(Supplier<RegistryLoader<I,Map<K,V>>> registryLoader)
RegistryLoader supplier.
The input type is not specified here, meaning the loader return type is either
predefined, or the registry is populated at a later point.I - the inputK - the map keyV - the map valueregistryLoader - the registry loader supplierpublic static <I,K,V> SimpleMappedRegistry<K,V> create(I input, Supplier<RegistryLoader<I,Map<K,V>>> registryLoader)
RegistryLoader and input.I - the inputK - the map keyV - the map valueregistryLoader - the registry loaderCopyright © 2021 GeyserMC. All rights reserved.