diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-23 18:05:14 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-23 18:05:14 +0200 |
commit | a086a98cff6d5b327477fe7846495f1d392feebd (patch) | |
tree | 18f52aab6777c27a0e623921f863efb1c50fdb80 /src/main/java/cc/polyfrost/oneconfig/plugin | |
parent | cc30afc4eb515c93b0d763e4347bee628c007372 (diff) | |
download | OneConfig-a086a98cff6d5b327477fe7846495f1d392feebd.tar.gz OneConfig-a086a98cff6d5b327477fe7846495f1d392feebd.tar.bz2 OneConfig-a086a98cff6d5b327477fe7846495f1d392feebd.zip |
OC-23 some things
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/plugin')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java | 3 |
1 files changed, 2 insertions, 1 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 732db97..45dc1e2 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 @@ -93,11 +93,12 @@ public class VigilantTransformer implements ITransformer { 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(); + String imageName = Loader.instance().activeModContainer() == null || Loader.instance().activeModContainer().getMetadata().logoFile.trim().equals("") ? null : "/" + Loader.instance().activeModContainer().getMetadata().logoFile; 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, Loader.instance().activeModContainer() == null ? "Unknown" : Loader.instance().activeModContainer().getName(), Loader.instance().activeModContainer() == null ? "1.0.0" : Loader.instance().activeModContainer().getVersion()), file.getAbsolutePath(), vigilant); + return new VigilanceConfig(new Mod(name, ModType.THIRD_PARTY, imageName), file.getAbsolutePath(), vigilant); } else { return null; } |