Fix typo and NPE
This commit is contained in:
parent
b84f507644
commit
53dfc62288
@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
loader_version=0.8.8+build.202
|
loader_version=0.8.8+build.202
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.0
|
mod_version = 1.0.1
|
||||||
maven_group = io.gitlab.jfronny
|
maven_group = io.gitlab.jfronny
|
||||||
archives_base_name = translater
|
archives_base_name = translater
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@ public abstract class CachingTransformer implements StringTransformer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String transform(String str) {
|
public String transform(String str) {
|
||||||
|
if (str == null)
|
||||||
|
return str;
|
||||||
if (cache == null) {
|
if (cache == null) {
|
||||||
cache = new Properties();
|
cache = new Properties();
|
||||||
if (!ModInit.cfg.forceRegenerate) {
|
if (!ModInit.cfg.forceRegenerate) {
|
||||||
|
@ -4,7 +4,7 @@ import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
|
|||||||
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
|
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
|
||||||
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
|
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
|
||||||
|
|
||||||
@Config(name = "TanslaterCF")
|
@Config(name = "TranslaterCF")
|
||||||
public class Cfg implements ConfigData {
|
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")
|
@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;
|
public int rounds = 10;
|
||||||
|
7
src/main/resources/assets/translater/lang/en_us.json
Normal file
7
src/main/resources/assets/translater/lang/en_us.json
Normal 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"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user