mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-22 13:09:44 +00:00
Ensure TickScheduler save file exists
This commit is contained in:
1 parent
611bae4004
commit
1ea8733e5a
1 file changed
+7
-1
@@ -114,7 +114,13 @@ object TickScheduler extends WorldExtensionInstantiator
|
||||
}
|
||||
|
||||
override def save() {
|
||||
val dout = new DataOutputStream(new FileOutputStream(saveFile));
|
||||
val file = saveFile
|
||||
if(!file.getParentFile.exists)
|
||||
file.getParentFile.mkdirs()
|
||||
if(!file.exists)
|
||||
file.createNewFile()
|
||||
|
||||
val dout = new DataOutputStream(new FileOutputStream(file));
|
||||
CompressedStreamTools.writeCompressed(saveTag, dout);
|
||||
dout.close();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user