/**
* Loads the idCounts Map from the 'idcounts' file.
*/
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();
for (String s : nbttagcompound.getKeySet())
{
NBTBase nbtbase = nbttagcompound.getTag(s);
if (nbtbase instanceof NBTTagShort)
{
NBTTagShort nbttagshort = (NBTTagShort)nbtbase;
short short1 = nbttagshort.getShort();
this.idCounts.put(s, Short.valueOf(short1));
}
}
}
}
catch (Exception exception)
{
exception.printStackTrace();
}
}
MapStorage.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:BaseClient
作者:
评论列表
文章目录