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.

    • Method Detail

      • registry

        RegistryType<T> registry()
        Gets the location defining the parent registry.
        Returns:
        The location
      • location

        ResourceKey location()
        Gets the key defining the id. See the documentation on resource key for more information on the composition of this key.
        Returns:
        The key
      • asReference

        RegistryReference<T> asReference()
        Generates a utility reference used to assist in querying a value from this key
        Returns:
        The reference
      • asDefaultedReference

        <V extends TDefaultedRegistryReference<V> asDefaultedReference​(java.util.function.Supplier<RegistryHolder> defaultHolder)
        Generates a utility reference used to assist in querying a value from this key
        Returns:
        The reference