Package org.spongepowered.api.registry
Interface RegistryType<T>
-
- All Known Subinterfaces:
DefaultedRegistryType<T>
public interface RegistryType<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RegistryType.Factory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <V extends T>
DefaultedRegistryType<V>asDefaultedType(Supplier<RegistryHolder> defaultHolder)
Gets a utilitydefaulted type
for easier querying of the intention of where the registry is contained.default ResourceKey
keyFor(RegistryHolder holder, T value)
ResourceKey
location()
static <T> RegistryType<T>
of(ResourceKey root, ResourceKey location)
default RegistryReference<T>
referenced(ResourceKey key)
ResourceKey
root()
-
-
-
Method Detail
-
of
static <T> RegistryType<T> of(ResourceKey root, ResourceKey location)
-
root
ResourceKey root()
-
location
ResourceKey location()
-
keyFor
default ResourceKey keyFor(RegistryHolder holder, T value)
-
referenced
default RegistryReference<T> referenced(ResourceKey key)
-
asDefaultedType
<V extends T> DefaultedRegistryType<V> asDefaultedType(Supplier<RegistryHolder> defaultHolder)
Gets a utilitydefaulted type
for easier querying of the intention of where the registry is contained.- Type Parameters:
V
- The type- Parameters:
defaultHolder
- The default holder- Returns:
- The defaulted type
-
-