Interface RegistryReference<T>

    • Method Detail

      • get

        T get​(RegistryHolder... holders)
        Gets the value from the holders.

        Behavior wise, the first holder that has a type of registry within will be queried for this reference. If the registry is present, no additional holders will be queried.

        Great care needs to be made in calling this method with any uncertainty as to if this reference will exist in the holders. Should this reference lack a value, a ValueNotFoundException

        will be thrown. Therefore, it is advised to call find(RegistryHolder...) instead.
        Parameters:
        holders - The holders to look against
        Returns:
        The value
      • find

        Optional<T> find​(RegistryHolder... holders)
        Gets the value from the holders.

        Behavior wise, the first holder that has a type of registry within will be queried for this reference. If the registry is present, no additional holders will be queried.

        Parameters:
        holders - The holders to look against
        Returns:
        The value