diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-02 06:12:23 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-02 06:12:23 +0700 |
commit | d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 (patch) | |
tree | 9bb9b53e2823f73084780673763504f4098bae69 /src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance | |
parent | d2b1d57120bb51e76191302a58d935afe52b89df (diff) | |
download | OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.gz OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.bz2 OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.zip |
Separate Minecraft dependant and non-dependant code
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java index 1948e0a..97dd0cb 100644 --- a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java +++ b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java @@ -8,11 +8,11 @@ import cc.polyfrost.oneconfig.config.elements.OptionPage; import cc.polyfrost.oneconfig.config.elements.BasicOption; import cc.polyfrost.oneconfig.config.Config; import cc.polyfrost.oneconfig.gui.elements.config.*; +import cc.polyfrost.oneconfig.platform.Platform; import gg.essential.vigilance.Vigilant; import gg.essential.vigilance.data.*; import kotlin.reflect.KMutableProperty0; import kotlin.reflect.jvm.ReflectJvmMapping; -import net.minecraft.client.resources.I18n; import java.awt.*; import java.lang.reflect.Field; @@ -131,7 +131,7 @@ public class VigilanceConfig extends Config { private String getName(PropertyAttributesExt ext) { try { PropertyAttributesExt.class.getDeclaredField("i18nName").setAccessible(true); - return I18n.format((String) PropertyAttributesExt.class.getDeclaredField("i18nName").get(ext)); + return Platform.getI18nPlatform().format((String) PropertyAttributesExt.class.getDeclaredField("i18nName").get(ext)); } catch (IllegalAccessException | NoSuchFieldException e) { return ext.getName(); } @@ -140,7 +140,7 @@ public class VigilanceConfig extends Config { private String getCategory(PropertyAttributesExt ext) { try { PropertyAttributesExt.class.getDeclaredField("i18nCategory").setAccessible(true); - return I18n.format((String) PropertyAttributesExt.class.getDeclaredField("i18nCategory").get(ext)); + return Platform.getI18nPlatform().format((String) PropertyAttributesExt.class.getDeclaredField("i18nCategory").get(ext)); } catch (IllegalAccessException | NoSuchFieldException e) { return ext.getCategory(); } @@ -149,7 +149,7 @@ public class VigilanceConfig extends Config { private String getSubcategory(PropertyAttributesExt ext) { try { PropertyAttributesExt.class.getDeclaredField("i18nSubcategory").setAccessible(true); - return I18n.format((String) PropertyAttributesExt.class.getDeclaredField("i18nSubcategory").get(ext)); + return Platform.getI18nPlatform().format((String) PropertyAttributesExt.class.getDeclaredField("i18nSubcategory").get(ext)); } catch (IllegalAccessException | NoSuchFieldException e) { return ext.getSubcategory(); } |