removed sun's import
This commit is contained in:
1 parent
ecb578bf49
commit
53f6a49b8d
2 files changed
+3
-5
No files matched your search
@@ -15,7 +15,6 @@ import com.google.gson.JsonElement;
|
|||||||
import com.google.gson.JsonParseException;
|
import com.google.gson.JsonParseException;
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import com.google.gson.stream.JsonReader;
|
import com.google.gson.stream.JsonReader;
|
||||||
import com.sun.nio.zipfs.ZipPath;
|
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.NbtIo;
|
import net.minecraft.nbt.NbtIo;
|
||||||
import net.minecraft.nbt.PositionTracker;
|
import net.minecraft.nbt.PositionTracker;
|
||||||
@@ -368,7 +367,7 @@ public class FileArgument
|
|||||||
Path dataFile = toPath(module);
|
Path dataFile = toPath(module);
|
||||||
if (dataFile == null) return false;
|
if (dataFile == null) return false;
|
||||||
createPaths(dataFile);
|
createPaths(dataFile);
|
||||||
return writeTagDisk(tag, dataFile);
|
return writeTagDisk(tag, dataFile, zipContainer != null);
|
||||||
} }
|
} }
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -377,12 +376,11 @@ public class FileArgument
|
|||||||
}
|
}
|
||||||
|
|
||||||
//copied private method from net.minecraft.nbt.NbtIo.write() and client method safe_write
|
//copied private method from net.minecraft.nbt.NbtIo.write() and client method safe_write
|
||||||
public static boolean writeTagDisk(Tag tag_1, Path path)
|
public static boolean writeTagDisk(Tag tag_1, Path path, boolean zipped)
|
||||||
{
|
{
|
||||||
Path original = path;
|
Path original = path;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boolean zipped = path instanceof ZipPath;
|
|
||||||
if (!zipped)
|
if (!zipped)
|
||||||
{
|
{
|
||||||
path = new File(path.toFile().getAbsolutePath() + "_tmp").toPath();
|
path = new File(path.toFile().getAbsolutePath() + "_tmp").toPath();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public abstract class Module
|
|||||||
Path dataFile = resolveResource(module);
|
Path dataFile = resolveResource(module);
|
||||||
if (dataFile == null) return;
|
if (dataFile == null) return;
|
||||||
if (!Files.exists(dataFile.getParent()) && !dataFile.toFile().getParentFile().mkdirs()) return;
|
if (!Files.exists(dataFile.getParent()) && !dataFile.toFile().getParentFile().mkdirs()) return;
|
||||||
synchronized (FileArgument.writeIOSync) { FileArgument.writeTagDisk(globalState, dataFile); }
|
synchronized (FileArgument.writeIOSync) { FileArgument.writeTagDisk(globalState, dataFile, false); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Path resolveResource(Module module)
|
private static Path resolveResource(Module module)
|
||||||
|
|||||||
Reference in new issue
Block a user