|
|
@ -15,8 +15,6 @@ import turniplabs.halplibe.helper.BlockHelper;
|
|
|
|
import turniplabs.halplibe.helper.RecipeHelper;
|
|
|
|
import turniplabs.halplibe.helper.RecipeHelper;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.*;
|
|
|
|
import java.io.*;
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class IronChestMain implements ModInitializer {
|
|
|
|
public class IronChestMain implements ModInitializer {
|
|
|
@ -104,7 +102,7 @@ public class IronChestMain implements ModInitializer {
|
|
|
|
InputStream in;
|
|
|
|
InputStream in;
|
|
|
|
OutputStream out;
|
|
|
|
OutputStream out;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
in = new FileInputStream(getDefaultConfig());
|
|
|
|
in = getClass().getClassLoader().getResourceAsStream("assets/ironchest/config.toml");
|
|
|
|
out = new FileOutputStream(config);
|
|
|
|
out = new FileOutputStream(config);
|
|
|
|
byte[] buffer = new byte[1024];
|
|
|
|
byte[] buffer = new byte[1024];
|
|
|
|
int length;
|
|
|
|
int length;
|
|
|
@ -120,18 +118,4 @@ public class IronChestMain implements ModInitializer {
|
|
|
|
return config;
|
|
|
|
return config;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public File getDefaultConfig() {
|
|
|
|
|
|
|
|
URL defaultConfig = getClass().getClassLoader().getResource("assets/ironchest/config.toml");
|
|
|
|
|
|
|
|
if (defaultConfig == null) {
|
|
|
|
|
|
|
|
LOGGER.warn("Default Config For afloydironchest Not Found! REAL BAD.");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
return new File(defaultConfig.toURI());
|
|
|
|
|
|
|
|
} catch (URISyntaxException e) {
|
|
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|