Interface RegistrySupplier<T>

All Superinterfaces:
Supplier<T>

public interface RegistrySupplier<T> extends Supplier<T>
  • Method Details

    • getRegistryId

      net.minecraft.resources.ResourceLocation getRegistryId()
      Returns:
      the identifier of the registry
    • getId

      net.minecraft.resources.ResourceLocation getId()
      Returns:
      the identifier of the entry
    • isPresent

      boolean isPresent()
      Returns:
      whether the entry has been registered
    • getOrNull

      @Nullable default T getOrNull()
    • toOptional

      default Optional<T> toOptional()
    • ifPresent

      default void ifPresent(Consumer<? super T> action)
    • ifPresentOrElse

      default void ifPresentOrElse(Consumer<? super T> action, Runnable emptyAction)
    • stream

      default Stream<T> stream()
    • orElse

      default T orElse(T other)
    • orElseGet

      default T orElseGet(Supplier<? extends T> supplier)