From a086a98cff6d5b327477fe7846495f1d392feebd Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Mon, 23 May 2022 18:05:14 +0200 Subject: OC-23 some things --- .../polyfrost/oneconfig/plugin/asm/tweakers/VigilantTransformer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/plugin') 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; } -- cgit