Add explicit create file to save

This commit is contained in:
satellite 2021-04-04 23:45:32 -04:00
parent 3baf78f599
commit 8ac86a0c84
2 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@ public class TerrainManager {
Gson gson = new Gson();
String terrainOutRaw = gson.toJson(model);
try {
Files.createFile(new File(Globals.mainConfig.loadTerrainLocation).toPath());
Files.write(new File(Globals.mainConfig.loadTerrainLocation).toPath(), terrainOutRaw.getBytes());
} catch (IOException ex) {
ex.printStackTrace();

View File

@ -1,5 +1,5 @@
{
"projectMainDirectory" : "/Users/satellite/p/Renderer/src/main/resources/Config",
"loadTerrain" : true,
"loadTerrain" : false,
"loadTerrainLocation" : "/Users/satellite/p/Renderer/src/main/resources/Config/terrain.json"
}