com.google.common.collect.ImmutableTable.Builder的实例源码

项目:RuneCraftery    文件:GameData.java   
public static void buildModObjectTable()
{
    if (modObjectTable != null)
    {
        throw new IllegalStateException("Illegal call to buildModObjectTable!");
    }

    Map<Integer,Cell<String,String,Integer>> map = Maps.transformValues(idMap,new Function<ItemData,Integer>>() {
        public Cell<String,Integer> apply(ItemData data)
        {
            if ("Minecraft".equals(data.getModId()) || !data.isOveridden())
            {
                return null;
            }
            return Tables.immutableCell(data.getModId(),data.getItemType(),data.getItemId());
        }
    });

    Builder<String,Integer> tBuilder = ImmutableTable.builder();
    for (Cell<String,Integer> c : map.values())
    {
        if (c!=null)
        {
            tBuilder.put(c);
        }
    }
    modObjectTable = tBuilder.build();
}
项目:RuneCraftery    文件:GameData.java   
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.SEVERE,e,"Failed to write registry data to %s",f.getAbsolutePath());
        }
    }
}
项目:BetterNutritionMod    文件:GameData.java   
public static void buildModObjectTable()
{
    if (modObjectTable != null)
    {
        throw new IllegalStateException("Illegal call to buildModObjectTable!");
    }

    Map<Integer,Integer> c : map.values())
    {
        if (c!=null)
        {
            tBuilder.put(c);
        }
    }
    modObjectTable = tBuilder.build();
}
项目:BetterNutritionMod    文件:GameData.java   
public static void dumpRegistry(File minecraftDir)
{
    if (customItemStacks == null)
    {
        return;
    }
    if (Boolean.valueOf(System.getProperty("fml.dumpRegistry",f.getAbsolutePath());
        }
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


com.google.gson.internal.bind.ArrayTypeAdapter的实例源码
com.google.gson.JsonSyntaxException的实例源码
com.google.gson.JsonDeserializer的实例源码
com.google.gson.internal.ConstructorConstructor的实例源码
com.google.gson.JsonPrimitive的实例源码
com.google.gson.LongSerializationPolicy的实例源码
com.google.gson.internal.GsonInternalAccess的实例源码
com.google.gson.JsonIOException的实例源码
com.google.gson.internal.StringMap的实例源码
com.google.gson.JsonObject的实例源码
com.google.gson.internal.bind.TimeTypeAdapter的实例源码
com.google.gson.FieldAttributes的实例源码
com.google.gson.internal.bind.TreeTypeAdapter的实例源码
com.google.gson.internal.LinkedHashTreeMap的实例源码
com.google.gson.TypeAdapterFactory的实例源码
com.google.gson.JsonSerializer的实例源码
com.google.gson.FieldNamingPolicy的实例源码
com.google.gson.JsonElement的实例源码
com.google.gson.internal.JsonReaderInternalAccess的实例源码
com.google.gson.TypeAdapter的实例源码