resonant-induction/APIs/buildcraft/api/transport/FacadeManager.java

26 lines
618 B
Java
Raw Normal View History

2013-09-06 08:31:44 +02:00
package buildcraft.api.transport;
import java.lang.reflect.Method;
import net.minecraft.item.ItemStack;
/**
* You can use this if you wish, but FML InterModComms are recommended.
*
* SYNTAX: add-facade:id@meta
*/
public class FacadeManager {
private static Method addFacade;
@SuppressWarnings({ "unchecked", "rawtypes" })
public static void addFacade(ItemStack is) {
try {
if (addFacade == null) {
Class facade = Class.forName("buildcraft.transport.ItemFacade");
addFacade = facade.getMethod("addFacade", ItemStack.class);
}
addFacade.invoke(null, is);
} catch (Exception ex) {
}
}
}