mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-18 11:29:35 +00:00
Use buffered streams when managing NBT files
This commit is contained in:
1 parent
8d1619589d
commit
f2180dfab5
7 files changed
+51
-47
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import codechicken.lib.config.ConfigTagParent;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@@ -26,7 +27,7 @@ public class ConfigSet
|
||||
if (!nbtFile.exists())
|
||||
nbtFile.createNewFile();
|
||||
if (nbtFile.length() > 0)
|
||||
nbt = CompressedStreamTools.read(nbtFile);
|
||||
nbt = NEIServerUtils.readNBT(nbtFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -34,7 +35,7 @@ public class ConfigSet
|
||||
|
||||
public void saveNBT() {
|
||||
try {
|
||||
CompressedStreamTools.write(nbt, nbtFile);
|
||||
NEIServerUtils.writeNBT(nbt, nbtFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user