ItemApiLookupImpl

public class ItemApiLookupImpl<A, C> implements ItemApiLookup<A, C>

Functions

apiClass
Link copied to clipboard
Class<AapiClass()
Return the API class of this lookup.
contextClass
Link copied to clipboard
Class<CcontextClass()
Return the context class of this lookup.
find
Link copied to clipboard
@Nullable()
A find(ItemStack itemStack, C context)
Attempt to retrieve an API from an item stack.
get
Link copied to clipboard
static ItemApiLookup<A, Cget<A, C>(Identifier lookupId, Class<A> apiClass, Class<C> contextClass)
registerFallback
Link copied to clipboard
void registerFallback(ItemApiLookup.ItemApiProvider<A, C> fallbackProvider)
Expose the API for all queries: the fallbacks providers will be invoked if no object was found using the regular providers.
registerForItems
Link copied to clipboard
void registerForItems(ItemApiLookup.ItemApiProvider<A, C> provider, Array<ItemConvertible> items)
Expose the API for the passed items.
registerSelf
Link copied to clipboard
void registerSelf(Array<ItemConvertible> items)
Expose the API for the passed items directly implementing it.

Sources

jvm source
Link copied to clipboard