Пример #1
0
  // TODO: Add Methods for Retro-Gen of limestone and rutile
  public boolean doGen(RetroData data, String ore, Chunk chunk) {
    try {
      Field field = mariculture.core.lib.RetroGeneration.class.getField(ore.toUpperCase());
      boolean isEnabled = field.getBoolean(mariculture.core.lib.RetroGeneration.class);
      if (isEnabled || RetroGeneration.ALL) {
        if (!data.hasRetroGenned(ore, chunk)) {
          if (data.setHasRetroGenned(ore, chunk)) {
            return true;
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      ore = ore.substring(0, 1).toUpperCase() + ore.substring(1);
      LogHandler.log(Level.WARN, "Mariculture's Retro-Gen of " + ore + " Failed");
    }

    return false;
  }