MapStorage.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:Cauldron 作者:
private void loadIdCounts()
{
    try
    {
        this.idCounts.clear();

        if (this.saveHandler == null)
        {
            return;
        }

        File file1 = this.saveHandler.getMapFileFromName("idcounts");

        if (file1 != null && file1.exists())
        {
            DataInputStream datainputstream = new DataInputStream(new FileInputStream(file1));
            NBTTagCompound nbttagcompound = CompressedStreamTools.read(datainputstream);
            datainputstream.close();
            Iterator iterator = nbttagcompound.func_150296_c().iterator();

            while (iterator.hasNext())
            {
                String s = (String)iterator.next();
                NBTBase nbtbase = nbttagcompound.getTag(s);

                if (nbtbase instanceof NBTTagShort)
                {
                    NBTTagShort nbttagshort = (NBTTagShort)nbtbase;
                    short short1 = nbttagshort.func_150289_e();
                    this.idCounts.put(s, Short.valueOf(short1));
                }
            }
        }
    }
    catch (Exception exception)
    {
        exception.printStackTrace();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号