Interface ItemApiLookup.ItemApiProvider<A,C>

Enclosing interface:
ItemApiLookup<A,C>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ItemApiLookup.ItemApiProvider<A,C>
  • Method Summary

    Modifier and Type
    Method
    Description
    find(net.minecraft.item.ItemStack itemStack, C context)
    Return an API of type A if available for the given item stack with the given context, or null otherwise.
  • Method Details

    • find

      @Nullable A find(net.minecraft.item.ItemStack itemStack, C context)
      Return an API of type A if available for the given item stack with the given context, or null otherwise.

      Note: An API may or may not allow the item stack to be modified by the returned instance. API authors are strongly encouraged to document this behavior so that implementors can refer to the API documentation.
      While providers may capture a reference to the stack, it is expected that they do not modify it directly.

      Parameters:
      itemStack - The item stack.
      context - Additional context passed to the query.
      Returns:
      An API of type A, or null if no API is available.