@EventHandler public void init(FMLInitializationEvent event) { try { Class.forName("cofh.api.block.IBlockAppearance"); } catch (ClassNotFoundException ignore) { } }
@EventHandler public void handleIMC(FMLInterModComms.IMCEvent event) { for (FMLInterModComms.IMCMessage msg : event.getMessages()) { if ("blacklist".equals(msg.key) && msg.isStringMessage()) { String s = msg.getStringValue(); ResourceLocation location = new ResourceLocation(s); Block object = Block.REGISTRY.getObject(location); if (object != Blocks.AIR) { ProxyRegistry.register(object, IMoveCheck.class, BLACKLIST); } else { try { Class<?> aClass = Class.forName(s); ProxyRegistry.register(aClass, IMoveCheck.class, BLACKLIST); } catch (ClassNotFoundException ignore) { } } } } }