diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-06-05 10:39:49 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-06-05 10:39:49 +0100 |
commit | 17826161c67f6adf5976d7993ac0a229193e2eb6 (patch) | |
tree | f4172013d2db0986f0bb123040be1dc5b5823b3d /src/main/java/cc/polyfrost/oneconfig/plugin/asm | |
parent | 087f5404658a1543834f16a89e3436f8399297f6 (diff) | |
parent | 72c024213e7c61411ce12f6032f8ef0659408c3a (diff) | |
download | OneConfig-17826161c67f6adf5976d7993ac0a229193e2eb6.tar.gz OneConfig-17826161c67f6adf5976d7993ac0a229193e2eb6.tar.bz2 OneConfig-17826161c67f6adf5976d7993ac0a229193e2eb6.zip |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
# src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuad.java
# src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
# src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java
# src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
# src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java
# src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java
# src/main/java/cc/polyfrost/oneconfig/utils/GuiUtils.java
# src/main/java/cc/polyfrost/oneconfig/utils/commands/annotations/Command.java
# src/main/java/cc/polyfrost/oneconfig/utils/commands/arguments/ArgumentParser.java
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/plugin/asm')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java b/src/main/java/cc/polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java index fecdeed..29cf2fd 100644 --- a/src/main/java/cc/polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java +++ b/src/main/java/cc/polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java @@ -16,6 +16,20 @@ import org.objectweb.asm.tree.*; import java.io.File; public class VigilantTransformer implements ITransformer { + @SuppressWarnings("unused") + public static VigilanceConfig returnNewConfig(Vigilant vigilant, File file) { + if (vigilant != null && Minecraft.getMinecraft().isCallingFromMinecraftThread()) { + String name = !vigilant.getGuiTitle().equals("Settings") ? vigilant.getGuiTitle() : Loader.instance().activeModContainer() == null ? "Unknown" : Loader.instance().activeModContainer().getName(); + if (name.equals("OneConfig")) name = "Essential"; + String finalName = name; + // duplicate fix + if (ConfigCore.oneConfigMods.stream().anyMatch(mod -> mod.name.equals(finalName))) return null; + return new VigilanceConfig(new Mod(name, ModType.THIRD_PARTY), file.getAbsolutePath(), vigilant); + } else { + return null; + } + } + @Override public String[] getClassName() { return new String[]{"gg.essential.vigilance.Vigilant"}; @@ -88,18 +102,4 @@ public class VigilantTransformer implements ITransformer { } } } - - @SuppressWarnings("unused") - public static VigilanceConfig returnNewConfig(Vigilant vigilant, File file) { - if (vigilant != null && Minecraft.getMinecraft().isCallingFromMinecraftThread()) { - String name = !vigilant.getGuiTitle().equals("Settings") ? vigilant.getGuiTitle() : Loader.instance().activeModContainer() == null ? "Unknown" : Loader.instance().activeModContainer().getName(); - if (name.equals("OneConfig")) name = "Essential"; - String finalName = name; - // duplicate fix - if (ConfigCore.oneConfigMods.stream().anyMatch(mod -> mod.name.equals(finalName))) return null; - return new VigilanceConfig(new Mod(name, ModType.THIRD_PARTY), file.getAbsolutePath(), vigilant); - } else { - return null; - } - } } |