示例#1
0
文件: GameData.java 项目: Kobata/FML
  public static void dumpRegistry(File minecraftDir) {
    if (customItemStacks == null) {
      return;
    }
    if (Boolean.valueOf(System.getProperty("fml.dumpRegistry", "false")).booleanValue()) {
      ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder();
      for (String modId : customItemStacks.rowKeySet()) {
        builder.putAll(modId, customItemStacks.row(modId).keySet());
      }

      File f = new File(minecraftDir, "itemStackRegistry.csv");
      MapJoiner mapJoiner = Joiner.on("\n").withKeyValueSeparator(",");
      try {
        Files.write(mapJoiner.join(builder.build().entries()), f, Charsets.UTF_8);
        FMLLog.log(Level.INFO, "Dumped item registry data to %s", f.getAbsolutePath());
      } catch (IOException e) {
        FMLLog.log(Level.ERROR, e, "Failed to write registry data to %s", f.getAbsolutePath());
      }
    }
  }
示例#2
0
文件: Friends.java 项目: kalpas/vk
 private String buildRequest(String id) {
   Map<String, String> params = new HashMap<>();
   params.put("user_id", id);
   params.put("fields", "domain");
   return get + "?" + joiner.join(params);
 }