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 interfaceRegistryType.Factory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <V extends T>
DefaultedRegistryType<V>asDefaultedType(java.util.function.Supplier<RegistryHolder> defaultHolder)Gets a utilitydefaulted typefor easier querying of the intention of where the registry is contained.default ResourceKeykeyFor(RegistryHolder holder, T value)ResourceKeylocation()static <T> RegistryType<T>of(ResourceKey root, ResourceKey location)default RegistryReference<T>referenced(ResourceKey key)ResourceKeyroot()
-
-
-
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(java.util.function.Supplier<RegistryHolder> defaultHolder)
Gets a utilitydefaulted typefor 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
-
-