Saving a structure to a sub folder fails if the folder does not exist yet
The bug
See title, saving a structure with a sub folder (eg "test/test") returns "unable to save structure" if the folder does not exist (it works fine if the folder exists).
Code analysis
TemplateManager.writeTemplate(MinecraftServer server, ResourceLocation id) returns false if creating a new instance of FileOutputStream throws a FileNotFoundException when the specified directory does not exist.
Created Issue:
Saving a structure to a sub folder fails if the folder does not exist yet
See title, saving a strucutre with a sub folder (eg "text/test") returns "failed to save structure" if the folder does not exist (it works fine if the folder exists).
See title, saving a struc
utre with a sub folder (eg "text/test") returns "failed to save structure" if the folder does not exist (it works fine if the folder exists).See title, saving a structure with a sub folder (eg "test/test") returns "failed to save structure" if the folder does not exist (it works fine if the folder exists).
See title, saving a structure with a sub folder (eg "test/test") returns "
failedto save structure" if the folder does not exist (it works fine if the folder exists).The bug
See title, saving a structure with a sub folder (eg "test/test") returns "unable to save structure" if the folder does not exist (it works fine if the folder exists).
Code analysis
TemplateManager.writeTemplate(MinecraftServer server, ResourceLocation id) returns false if outputstream = new FileOutputStream(file2) throws a FileNotFoundException because the specified directory does not exist.
The bug
See title, saving a structure with a sub folder (eg "test/test") returns "unable to save structure" if the folder does not exist (it works fine if the folder exists).
Code analysis
TemplateManager.writeTemplate(MinecraftServer server, ResourceLocation id) returns false if
outputstream = newFileOutputStream(file2)throws a FileNotFoundException because the specified directory does not exist.The bug
See title, saving a structure with a sub folder (eg "test/test") returns "unable to save structure" if the folder does not exist (it works fine if the folder exists).
Code analysis
TemplateManager.writeTemplate(MinecraftServer server, ResourceLocation id) returns false if creating a new instance of FileOutputStream throws a FileNotFoundException because the specified directory does not exist.
The bug
See title, saving a structure with a sub folder (eg "test/test") returns "unable to save structure" if the folder does not exist (it works fine if the folder exists).
Code analysis
TemplateManager.writeTemplate(MinecraftServer server, ResourceLocation id) returns false if creating a new instance of FileOutputStream throws a FileNotFoundException
becausethe specified directory does not exist.The bug
See title, saving a structure with a sub folder (eg "test/test") returns "unable to save structure" if the folder does not exist (it works fine if the folder exists).
Code analysis
TemplateManager.writeTemplate(MinecraftServer server, ResourceLocation id) returns false if creating a new instance of FileOutputStream throws a FileNotFoundException when the specified directory does not exist.
Fixed in some 1.13 snapshot.