Fix typo and NPE

This commit is contained in:
JFronny 2020-07-10 21:59:12 +02:00
parent b84f507644
commit 53dfc62288
4 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.8.8+build.202
# Mod Properties
mod_version = 1.0.0
mod_version = 1.0.1
maven_group = io.gitlab.jfronny
archives_base_name = translater

View File

@ -11,6 +11,8 @@ public abstract class CachingTransformer implements StringTransformer {
@Override
public String transform(String str) {
if (str == null)
return str;
if (cache == null) {
cache = new Properties();
if (!ModInit.cfg.forceRegenerate) {

View File

@ -4,7 +4,7 @@ import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
@Config(name = "TanslaterCF")
@Config(name = "TranslaterCF")
public class Cfg implements ConfigData {
@Comment("NOTE: remove the cache after you change the config!\nRegenerating the cache can take up to 3 hours for vanilla (5000 strings)\nWatch the log when in doubt\n\nThe amount of times to translate each element")
public int rounds = 10;

View File

@ -0,0 +1,7 @@
{
"text.autoconfig.TranslaterCF.title": "Translater",
"text.autoconfig.TranslaterCF.option.rounds": "Rounds",
"text.autoconfig.TranslaterCF.option.breakFully": "Break Fully",
"text.autoconfig.TranslaterCF.option.key": "API Key",
"text.autoconfig.TranslaterCF.option.forceRegenerate": "Force Regenerate"
}