mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
Make all the directories! \o/
This commit is contained in:
parent
c5cf9ec90f
commit
ee01652574
3 changed files with 3 additions and 2 deletions
|
@ -78,6 +78,7 @@ public class ExtraClientData{
|
|||
public static File getTheFile(){
|
||||
try{
|
||||
if(!theFile.exists()){
|
||||
theFile.mkdirs();
|
||||
theFile.createNewFile();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ public class WorldData{
|
|||
|
||||
if(dataFile != null){
|
||||
if(!dataFile.exists()){
|
||||
dataFile.mkdirs();
|
||||
dataFile.createNewFile();
|
||||
ModUtil.LOGGER.info("Creating new WorldData file for world "+data.dimension+"!");
|
||||
}
|
||||
|
@ -144,8 +145,6 @@ public class WorldData{
|
|||
FileOutputStream stream = new FileOutputStream(dataFile);
|
||||
CompressedStreamTools.writeCompressed(compound, stream);
|
||||
stream.close();
|
||||
|
||||
ModUtil.LOGGER.info("Saved WorldData for world "+data.dimension+"!");
|
||||
}
|
||||
}
|
||||
catch(Exception e){
|
||||
|
|
|
@ -94,6 +94,7 @@ public class ClientProxy implements IProxy{
|
|||
if(ConfigBoolValues.BOOKLET_TEXT_TO_FILE.isEnabled()){
|
||||
File file = new File(Minecraft.getMinecraft().mcDataDir, ModUtil.MOD_ID+"booklettext.txt");
|
||||
try{
|
||||
file.mkdirs();
|
||||
file.createNewFile();
|
||||
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
|
||||
writer.write(TextFormatting.getTextWithoutFormattingCodes(bookletText));
|
||||
|
|
Loading…
Reference in a new issue