public final class ModuleAPI
extends java.lang.Object
ModuleProviders and other
module related tasks.
When trying to create a module instance for an ItemStack,
all registered providers will be queried, until one returns something not null.
This is made available in the init phase, so you'll either have to (soft) depend on TIS-3D or you must not make calls to this before the init phase.
| Modifier and Type | Method and Description |
|---|---|
static void |
addProvider(ModuleProvider provider)
Register the specified provider.
|
static ModuleProvider |
getProviderFor(net.minecraft.item.ItemStack stack,
Casing casing,
Face face)
Find the first provider supporting the specified item stack.
|
public static void addProvider(ModuleProvider provider)
provider - the provider to register.public static ModuleProvider getProviderFor(net.minecraft.item.ItemStack stack, Casing casing, Face face)
stack - the item stack to find a provider for.casing - the casing the module would be installed in.face - the face the module would be installed on.