added world_time and day_time. Add ability to store app data in shared space. as well as store in file hierarchies. Fixes #215

This commit is contained in:
gnembon committed 2020-04-15 01:58:46 -03:00
1 parent 3c25110b50
commit 8dbf269fde
8 files changed
+150 -51

No files matched your search

@@ -74,7 +74,7 @@ public class FileModule extends Module
}
//copied private method from net.minecraft.nbt.NbtIo.write() and client method safe_write
public static void write(Tag tag_1, File file)
public static boolean write(Tag tag_1, File file)
{
File file_2 = new File(file.getAbsolutePath() + "_tmp");
if (file_2.exists()) file_2.delete();
@@ -90,9 +90,10 @@ public class FileModule extends Module
}
catch (IOException e)
{
return;
return false;
}
if (file.exists()) file.delete();
if (!file.exists()) file_2.renameTo(file);
return true;
}
}