Add explicit create file to save
This commit is contained in:
parent
3baf78f599
commit
8ac86a0c84
@ -59,6 +59,7 @@ public class TerrainManager {
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
String terrainOutRaw = gson.toJson(model);
|
String terrainOutRaw = gson.toJson(model);
|
||||||
try {
|
try {
|
||||||
|
Files.createFile(new File(Globals.mainConfig.loadTerrainLocation).toPath());
|
||||||
Files.write(new File(Globals.mainConfig.loadTerrainLocation).toPath(), terrainOutRaw.getBytes());
|
Files.write(new File(Globals.mainConfig.loadTerrainLocation).toPath(), terrainOutRaw.getBytes());
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"projectMainDirectory" : "/Users/satellite/p/Renderer/src/main/resources/Config",
|
"projectMainDirectory" : "/Users/satellite/p/Renderer/src/main/resources/Config",
|
||||||
"loadTerrain" : true,
|
"loadTerrain" : false,
|
||||||
"loadTerrainLocation" : "/Users/satellite/p/Renderer/src/main/resources/Config/terrain.json"
|
"loadTerrainLocation" : "/Users/satellite/p/Renderer/src/main/resources/Config/terrain.json"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user