From e985ec8a32a6f24cab1a65b835e89cf24d39213d Mon Sep 17 00:00:00 2001 From: ExE Boss Date: Tue, 28 Feb 2017 22:57:46 +0100 Subject: [PATCH] Change MCRetentionManager file extension to .nbt --- .../wrapper/mc/forge/v17/manager/MCRetentionManager.java | 6 +++--- .../wrapper/mc/forge/v18/manager/MCRetentionManager.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/minecraft/1.7/src/main/java/nova/core/wrapper/mc/forge/v17/manager/MCRetentionManager.java b/minecraft/1.7/src/main/java/nova/core/wrapper/mc/forge/v17/manager/MCRetentionManager.java index b1e5e92ed..2f599878b 100644 --- a/minecraft/1.7/src/main/java/nova/core/wrapper/mc/forge/v17/manager/MCRetentionManager.java +++ b/minecraft/1.7/src/main/java/nova/core/wrapper/mc/forge/v17/manager/MCRetentionManager.java @@ -76,7 +76,7 @@ public void load(String filename, Storable storable) { */ public boolean saveFile(File file, NBTTagCompound data) { try { - File tempFile = new File(file.getParent(), file.getName() + "_tmp.dat"); + File tempFile = new File(file.getParent(), file.getName().replaceFirst("\\.nbt$", ".tmp.nbt")); CompressedStreamTools.writeCompressed(data, new FileOutputStream(tempFile)); @@ -94,7 +94,7 @@ public boolean saveFile(File file, NBTTagCompound data) { } public boolean saveFile(File saveDirectory, String filename, NBTTagCompound data) { - return saveFile(new File(saveDirectory, filename + ".dat"), data); + return saveFile(new File(saveDirectory, filename + ".nbt"), data); } public boolean saveFile(String filename, NBTTagCompound data) { @@ -122,7 +122,7 @@ public NBTTagCompound loadFile(File file) { * @return The NBT data */ public NBTTagCompound loadFile(File saveDirectory, String filename) { - return loadFile(new File(saveDirectory, filename + ".dat")); + return loadFile(new File(saveDirectory, filename + ".nbt")); } public NBTTagCompound loadFile(String filename) { diff --git a/minecraft/1.8/src/main/java/nova/core/wrapper/mc/forge/v18/manager/MCRetentionManager.java b/minecraft/1.8/src/main/java/nova/core/wrapper/mc/forge/v18/manager/MCRetentionManager.java index e53989a76..aa0695443 100644 --- a/minecraft/1.8/src/main/java/nova/core/wrapper/mc/forge/v18/manager/MCRetentionManager.java +++ b/minecraft/1.8/src/main/java/nova/core/wrapper/mc/forge/v18/manager/MCRetentionManager.java @@ -76,7 +76,7 @@ public void load(String filename, Storable storable) { */ public boolean saveFile(File file, NBTTagCompound data) { try { - File tempFile = new File(file.getParent(), file.getName() + "_tmp.dat"); + File tempFile = new File(file.getParent(), file.getName().replaceFirst("\\.nbt$", ".tmp.nbt")); CompressedStreamTools.writeCompressed(data, new FileOutputStream(tempFile)); @@ -94,7 +94,7 @@ public boolean saveFile(File file, NBTTagCompound data) { } public boolean saveFile(File saveDirectory, String filename, NBTTagCompound data) { - return saveFile(new File(saveDirectory, filename + ".dat"), data); + return saveFile(new File(saveDirectory, filename + ".nbt"), data); } public boolean saveFile(String filename, NBTTagCompound data) { @@ -122,7 +122,7 @@ public NBTTagCompound loadFile(File file) { * @return The NBT data */ public NBTTagCompound loadFile(File saveDirectory, String filename) { - return loadFile(new File(saveDirectory, filename + ".dat")); + return loadFile(new File(saveDirectory, filename + ".nbt")); } public NBTTagCompound loadFile(String filename) {