示例#1
0
  private void loadLibraries() {
    String prefix = "[" + getDescription().getName() + "] Loading ";

    for (CircuitIndex lib : preloadedLibs) {
      String libMsg = prefix + lib.getName() + " " + lib.getVersion() + " > ";
      Class<? extends Circuit>[] classes = lib.getCircuitClasses();

      if (classes != null && classes.length > 0) {
        for (Class c : classes) libMsg += c.getSimpleName() + ", ";

        libMsg = libMsg.substring(0, libMsg.length() - 2) + ".";
        log.info(libMsg);

        circuitLoader.addCircuitIndex(lib);
      } else {
        libMsg += "No circuit classes were loaded.";
        log.info(libMsg);
      }
    }
  }
示例#2
0
 private void callLibraryRedstoneChipsEnable() {
   for (CircuitIndex lib : circuitLoader.getCircuitLibraries()) {
     lib.onRedstoneChipsEnable(this);
   }
 }