Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
239ec7c3bc | ||
|
|
0f0abe558e | ||
|
|
5bdce25e29 |
+1
-1
@@ -9,7 +9,7 @@ loader_version=0.12.12
|
|||||||
#Fabric api
|
#Fabric api
|
||||||
fabric_version=0.45.0+1.18
|
fabric_version=0.45.0+1.18
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.2.2
|
mod_version=1.2.3
|
||||||
maven_group=draylar
|
maven_group=draylar
|
||||||
archives_base_name=omega-config
|
archives_base_name=omega-config
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ dependencies {
|
|||||||
modCompileOnly ("com.terraformersmc:modmenu:${project.modmenu_version}") {
|
modCompileOnly ("com.terraformersmc:modmenu:${project.modmenu_version}") {
|
||||||
transitive(false)
|
transitive(false)
|
||||||
}
|
}
|
||||||
modRuntime ("com.terraformersmc:modmenu:${project.modmenu_version}") {
|
modRuntimeOnly ("com.terraformersmc:modmenu:${project.modmenu_version}") {
|
||||||
transitive(false)
|
transitive(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import net.fabricmc.api.Environment;
|
|||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.text.LiteralText;
|
import net.minecraft.text.LiteralText;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@@ -55,7 +56,7 @@ public class OmegaConfigGui {
|
|||||||
return parent -> {
|
return parent -> {
|
||||||
try {
|
try {
|
||||||
Config defaultConfig = config.getClass().getDeclaredConstructor().newInstance();
|
Config defaultConfig = config.getClass().getDeclaredConstructor().newInstance();
|
||||||
ConfigScreen screen = ConfigScreen.create(new LiteralText(config.getName()), parent);
|
ConfigScreen screen = ConfigScreen.create(new TranslatableText(String.format("config.%s.%s", config.getModid(), config.getName())), parent);
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
for (Field field : config.getClass().getDeclaredFields()) {
|
for (Field field : config.getClass().getDeclaredFields()) {
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"config.omega-config-test.test-config": "Omega Config - Test Config"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user