From 5f80a147fb7e38590b4dd2b33e8e9a73378aa87e Mon Sep 17 00:00:00 2001 From: Astoria Date: Sat, 18 Mar 2023 11:44:37 -0500 Subject: [PATCH] Add config dir creation. --- .../java/net/brokenmoon/afloydironchest/IronChestMain.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/brokenmoon/afloydironchest/IronChestMain.java b/src/main/java/net/brokenmoon/afloydironchest/IronChestMain.java index f6ca5c8..84f9db0 100644 --- a/src/main/java/net/brokenmoon/afloydironchest/IronChestMain.java +++ b/src/main/java/net/brokenmoon/afloydironchest/IronChestMain.java @@ -102,6 +102,9 @@ public class IronChestMain implements ModInitializer { InputStream in; OutputStream out; try { + File configDir = new File("config"); + if (!configDir.exists()) + configDir.mkdir(); in = IronChestMain.class.getClassLoader().getResourceAsStream("assets/ironchest/config.toml"); out = new FileOutputStream(config); byte[] buffer = new byte[1024];