Package org.spongepowered.api.registry
Interface RegistryKey<T>
- Type Parameters:
- T- The type
- All Known Subinterfaces:
- DefaultedRegistryReference<T>,- RegistryReference<T>
public interface RegistryKey<T>
Similar to 
ResourceKey but with a defined type and id of the parent registry.
 The inclusion of the type assists with compile-time type verification checks.
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescription<V extends T>
 DefaultedRegistryReference<V>asDefaultedReference(Supplier<RegistryHolder> defaultHolder) Generates a utilityreferenceused to assist in querying a value from this keyGenerates a utilityreferenceused to assist in querying a value from this keylocation()Gets thekeydefining the id.static <T> RegistryKey<T>of(RegistryType<T> registry, ResourceKey location) registry()Gets thelocationdefining the parent registry.
- 
Method Details- 
of
- 
registryRegistryType<T> registry()Gets thelocationdefining the parent registry.- Returns:
- The location
 
- 
locationResourceKey location()Gets thekeydefining the id. See the documentation on resource key for more information on the composition of this key.- Returns:
- The key
 
- 
asReferenceRegistryReference<T> asReference()Generates a utilityreferenceused to assist in querying a value from this key- Returns:
- The reference
 
- 
asDefaultedReference<V extends T> DefaultedRegistryReference<V> asDefaultedReference(Supplier<RegistryHolder> defaultHolder) Generates a utilityreferenceused to assist in querying a value from this key- Returns:
- The reference
 
 
-