public interface DriverAPI
| Modifier and Type | Method and Description |
|---|---|
void |
add(Block driver)
Registers a new driver for a block component.
|
void |
add(Converter converter)
Registers a new type converter.
|
void |
add(Item driver)
Registers a new driver for an item component.
|
java.util.Collection<Block> |
blockDrivers()
Get a list of all registered block drivers.
|
Item |
driverFor(net.minecraft.item.ItemStack stack)
Looks up a driver for the specified item stack.
|
Item |
driverFor(net.minecraft.item.ItemStack stack,
java.lang.Class<? extends EnvironmentHost> host)
Looks up a driver for the specified item stack.
|
Block |
driverFor(net.minecraft.world.World world,
net.minecraft.util.BlockPos pos)
Looks up a driver for the block at the specified position in the
specified world.
|
java.util.Collection<Item> |
itemDrivers()
Get a list of all registered item drivers.
|
void add(Block driver)
driver - the driver for a block component.void add(Item driver)
driver - the driver for an item component.void add(Converter converter)
converter - the converter to register.Block driverFor(net.minecraft.world.World world, net.minecraft.util.BlockPos pos)
add(li.cil.oc.api.driver.Block).world - the world containing the block.pos - the position of the block.Item driverFor(net.minecraft.item.ItemStack stack, java.lang.Class<? extends EnvironmentHost> host)
stack - the item stack to get a driver for.host - the type that will host the environment created by returned driver.Item driverFor(net.minecraft.item.ItemStack stack)
stack - the item stack to get a driver for.java.util.Collection<Block> blockDrivers()
EnvironmentAware interface.java.util.Collection<Item> itemDrivers()
EnvironmentAware interface.