Ejemplo n.º 1
0
 public static void processIMC(FMLInterModComms.IMCEvent event) {
   for (FMLInterModComms.IMCMessage message : event.getMessages()) {
     if (message.key.equals(IMCKeys.FURNACE_FUEL)) {
       addFurnaceFuel(message);
     }
   }
 }
Ejemplo n.º 2
0
  @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) {

          }
        }
      }
    }
  }