fabric cleanup, move lang and config to common

This commit is contained in:
dfsek
2021-02-24 13:59:25 -07:00
parent 1637644bdd
commit 0fcc0f798c
18 changed files with 22 additions and 31 deletions

View File

@@ -163,11 +163,7 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
@Override
public Language getLanguage() {
try {
return new Language(new File(getDataFolder(), "lang/en_us.yml"));
} catch(IOException e) {
throw new IllegalArgumentException();
}
return LangUtil.getLanguage();
}
@Override
@@ -267,10 +263,10 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
public void onInitialize() {
instance = this;
config = new File(FabricLoader.getInstance().getConfigDir().toFile(), "Terra");
this.config = new File(FabricLoader.getInstance().getConfigDir().toFile(), "Terra");
saveDefaultConfig();
plugin.load(this);
LangUtil.load("en_us", this);
LangUtil.load(plugin.getLanguage(), this);
logger.info("Initializing Terra...");
if(!addonRegistry.loadAll()) {

View File

@@ -20,7 +20,6 @@
]
},
"mixins": [
"terra.mixins.json"
],
"depends": {
"fabricloader": ">=0.7.4",

View File

@@ -1,14 +0,0 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.dfsek.terra.fabric.mixin",
"compatibilityLevel": "JAVA_8",
"mixins": [
],
"client": [
],
"server": [],
"injectors": {
"defaultRequire": 1
}
}