From 0e693ca3c9e594daa0eda3dda8f990f17c6c929b Mon Sep 17 00:00:00 2001 From: deirn Date: Tue, 30 Mar 2021 19:13:33 +0700 Subject: [PATCH] initialize module after waila loaded to avoid rng crash --- megane-api/src/main/resources/fabric.mod.json | 2 +- .../runtime/{MeganeWaila.java => Megane.java} | 88 ++++++++++++++++- .../megane/runtime/MeganeInit.java | 97 ------------------- .../component/block/BeaconComponent.java | 4 +- .../component/block/BeeHiveComponent.java | 4 +- .../block/BlockInventoryComponent.java | 4 +- .../component/block/CauldronComponent.java | 4 +- .../component/block/ComposterComponent.java | 4 +- .../component/block/EnergyComponent.java | 4 +- .../component/block/FluidComponent.java | 4 +- .../component/block/ProgressComponent.java | 4 +- .../entity/EntityInventoryComponent.java | 4 +- .../component/entity/PetOwnerComponent.java | 4 +- .../entity/StatusEffectComponent.java | 4 +- .../src/main/resources/fabric.mod.json | 15 +-- 15 files changed, 115 insertions(+), 131 deletions(-) rename megane-runtime/src/main/java/badasintended/megane/runtime/{MeganeWaila.java => Megane.java} (55%) delete mode 100644 megane-runtime/src/main/java/badasintended/megane/runtime/MeganeInit.java diff --git a/megane-api/src/main/resources/fabric.mod.json b/megane-api/src/main/resources/fabric.mod.json index a723c5a..5d6b6cc 100644 --- a/megane-api/src/main/resources/fabric.mod.json +++ b/megane-api/src/main/resources/fabric.mod.json @@ -15,7 +15,7 @@ "icon" : "assets/megane/icon.png", "environment" : "*", "depends" : { - "waila": "*" + "wthit": "*" }, "custom" : { "modmenu": { diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/MeganeWaila.java b/megane-runtime/src/main/java/badasintended/megane/runtime/Megane.java similarity index 55% rename from megane-runtime/src/main/java/badasintended/megane/runtime/MeganeWaila.java rename to megane-runtime/src/main/java/badasintended/megane/runtime/Megane.java index 1f9b1e7..e72729d 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/MeganeWaila.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/Megane.java @@ -1,5 +1,11 @@ package badasintended.megane.runtime; +import java.io.File; +import java.nio.file.Path; +import java.util.HashMap; + +import badasintended.megane.api.MeganeModule; +import badasintended.megane.config.MeganeConfig; import badasintended.megane.runtime.component.AlignResetComponent; import badasintended.megane.runtime.component.block.BeaconComponent; import badasintended.megane.runtime.component.block.BeeHiveComponent; @@ -27,8 +33,13 @@ import badasintended.megane.runtime.renderer.InventoryRenderer; import badasintended.megane.runtime.renderer.ProgressRenderer; import badasintended.megane.runtime.renderer.StatusEffectRenderer; +import mcp.mobius.waila.Waila; import mcp.mobius.waila.api.IRegistrar; import mcp.mobius.waila.api.IWailaPlugin; +import net.fabricmc.api.EnvType; +import net.fabricmc.loader.api.FabricLoader; +import net.fabricmc.loader.api.metadata.CustomValue; +import net.fabricmc.loader.api.metadata.ModMetadata; import net.minecraft.block.BeaconBlock; import net.minecraft.block.BeehiveBlock; import net.minecraft.block.Block; @@ -38,11 +49,19 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.Identifier; +import static badasintended.megane.runtime.util.RuntimeUtils.oldConfigVersion; +import static badasintended.megane.runtime.util.RuntimeUtils.showUpdatedConfigToast; +import static badasintended.megane.util.MeganeUtils.CONFIG; +import static badasintended.megane.util.MeganeUtils.CONFIG_VERSION; +import static badasintended.megane.util.MeganeUtils.LOGGER; +import static badasintended.megane.util.MeganeUtils.MODID; +import static badasintended.megane.util.MeganeUtils.config; +import static badasintended.megane.util.MeganeUtils.hasMod; import static badasintended.megane.util.MeganeUtils.id; import static mcp.mobius.waila.api.TooltipPosition.HEAD; import static mcp.mobius.waila.api.TooltipPosition.TAIL; -public class MeganeWaila implements IWailaPlugin { +public class Megane implements IWailaPlugin { public static final Identifier INVENTORY = id("inventory"); public static final Identifier BAR = id("bar"); @@ -98,6 +117,73 @@ public void register(IRegistrar r) { r.registerEntityDataProvider(new EntityInventoryData(), ENTITY); r.registerEntityDataProvider(new PetOwnerData(), ENTITY); r.registerEntityDataProvider(new StatusEffectData(), ENTITY); + + // Modules + FabricLoader loader = FabricLoader.getInstance(); + + Path conf = loader.getConfigDir(); + File file = conf.resolve(Waila.MODID + "/" + MODID + ".json").toFile(); + if (file.exists()) { + int version = config().configVersion; + if (version != CONFIG_VERSION) + try { + File old = conf.resolve(Waila.MODID + "/" + MODID + ".json.old").normalize().toFile(); + old.delete(); + file.renameTo(old); + + MeganeConfig config = new MeganeConfig(); + config.configVersion = CONFIG_VERSION; + CONFIG.write(config, true); + + LOGGER.warn( + "[megane] Config reset because of different version ({} instead of {}), old config is available at {}", + version, CONFIG_VERSION, old + ); + oldConfigVersion = version; + showUpdatedConfigToast = true; + } catch (Exception e) { + // no-op + } + } else { + config().configVersion = CONFIG_VERSION; + CONFIG.save(); + } + + loader.getAllMods().forEach(mod -> { + ModMetadata metadata = mod.getMetadata(); + String modId = metadata.getId(); + if (metadata.containsCustomValue("megane:modules")) { + metadata.getCustomValue("megane:modules").getAsArray().forEach(value -> { + boolean satisfied = true; + String className; + if (value.getType() == CustomValue.CvType.OBJECT) { + CustomValue.CvObject object = value.getAsObject(); + className = object.get("init").getAsString(); + if (object.containsKey("deps")) + for (CustomValue dep : object.get("deps").getAsArray()) { + satisfied = satisfied && hasMod(dep.getAsString()); + } + } else { + className = value.getAsString(); + } + satisfied = satisfied && config().modules + .computeIfAbsent(modId, s -> new HashMap<>()) + .computeIfAbsent(className, s -> true); + CONFIG.save(); + if (satisfied) + try { + LOGGER.info("[megane] Loading {} from {}", className, modId); + MeganeModule entry = (MeganeModule) Class.forName(className).getDeclaredConstructor().newInstance(); + entry.initialize(); + if (loader.getEnvironmentType() == EnvType.CLIENT) + entry.initializeClient(); + } catch (Exception e) { + LOGGER.error("[megane] error when loading {} from {}", className, modId); + e.printStackTrace(); + } + }); + } + }); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/MeganeInit.java b/megane-runtime/src/main/java/badasintended/megane/runtime/MeganeInit.java deleted file mode 100644 index 1844127..0000000 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/MeganeInit.java +++ /dev/null @@ -1,97 +0,0 @@ -package badasintended.megane.runtime; - -import java.io.File; -import java.nio.file.Path; -import java.util.HashMap; - -import badasintended.megane.api.MeganeModule; -import badasintended.megane.config.MeganeConfig; -import mcp.mobius.waila.Waila; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.loader.api.FabricLoader; -import net.fabricmc.loader.api.metadata.CustomValue; -import net.fabricmc.loader.api.metadata.ModMetadata; - -import static badasintended.megane.runtime.util.RuntimeUtils.oldConfigVersion; -import static badasintended.megane.runtime.util.RuntimeUtils.showUpdatedConfigToast; -import static badasintended.megane.util.MeganeUtils.CONFIG; -import static badasintended.megane.util.MeganeUtils.CONFIG_VERSION; -import static badasintended.megane.util.MeganeUtils.LOGGER; -import static badasintended.megane.util.MeganeUtils.MODID; -import static badasintended.megane.util.MeganeUtils.config; -import static badasintended.megane.util.MeganeUtils.hasMod; - -public class MeganeInit implements ModInitializer { - - @Override - @SuppressWarnings("ResultOfMethodCallIgnored") - public void onInitialize() { - FabricLoader loader = FabricLoader.getInstance(); - - Path conf = loader.getConfigDir(); - File file = conf.resolve(Waila.MODID + "/" + MODID + ".json").toFile(); - if (file.exists()) { - int version = config().configVersion; - if (version != CONFIG_VERSION) - try { - File old = conf.resolve(Waila.MODID + "/" + MODID + ".json.old").normalize().toFile(); - old.delete(); - file.renameTo(old); - - MeganeConfig config = new MeganeConfig(); - config.configVersion = CONFIG_VERSION; - CONFIG.write(config, true); - - LOGGER.warn( - "[megane] Config reset because of different version ({} instead of {}), old config is available at {}", - version, CONFIG_VERSION, old - ); - oldConfigVersion = version; - showUpdatedConfigToast = true; - } catch (Exception e) { - // no-op - } - } else { - config().configVersion = CONFIG_VERSION; - CONFIG.save(); - } - - loader.getAllMods().forEach(mod -> { - ModMetadata metadata = mod.getMetadata(); - String modId = metadata.getId(); - if (metadata.containsCustomValue("megane:modules")) { - metadata.getCustomValue("megane:modules").getAsArray().forEach(value -> { - boolean satisfied = true; - String className; - if (value.getType() == CustomValue.CvType.OBJECT) { - CustomValue.CvObject object = value.getAsObject(); - className = object.get("init").getAsString(); - if (object.containsKey("deps")) - for (CustomValue dep : object.get("deps").getAsArray()) { - satisfied = satisfied && hasMod(dep.getAsString()); - } - } else { - className = value.getAsString(); - } - satisfied = satisfied && config().modules - .computeIfAbsent(modId, s -> new HashMap<>()) - .computeIfAbsent(className, s -> true); - CONFIG.save(); - if (satisfied) - try { - LOGGER.info("[megane] Loading {} from {}", className, modId); - MeganeModule entry = (MeganeModule) Class.forName(className).getDeclaredConstructor().newInstance(); - entry.initialize(); - if (loader.getEnvironmentType() == EnvType.CLIENT) - entry.initializeClient(); - } catch (Exception e) { - LOGGER.error("[megane] error when loading {} from {}", className, modId); - e.printStackTrace(); - } - }); - } - }); - } - -} diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeaconComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeaconComponent.java index 85efb6e..b5dd370 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeaconComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeaconComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.nbt.CompoundTag; @@ -30,7 +30,7 @@ protected void append(List tooltip, IDataAccessor accessor) { data.putString(S_LV_STR + i, str); } - tooltip.add(new RenderableTextComponent(MeganeWaila.EFFECT, data)); + tooltip.add(new RenderableTextComponent(Megane.EFFECT, data)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeeHiveComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeeHiveComponent.java index f708ee7..e7eba87 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeeHiveComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BeeHiveComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.block.BeehiveBlock; @@ -36,7 +36,7 @@ protected void append(List tooltip, IDataAccessor accessor) { TAG.putDouble(B_STORED, level); TAG.putDouble(B_MAX, 5); TAG.putString(B_PREFIX, I18n.translate("megane.level")); - tooltip.add(new RenderableTextComponent(MeganeWaila.BAR, TAG)); + tooltip.add(new RenderableTextComponent(Megane.BAR, TAG)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BlockInventoryComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BlockInventoryComponent.java index 77e5356..206af26 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BlockInventoryComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/BlockInventoryComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.nbt.CompoundTag; @@ -26,7 +26,7 @@ protected void append(List tooltip, IDataAccessor accessor) { if (data.getBoolean(I_HAS) && data.getInt(P_PERCENT) == 0 && data.getInt("progress") == 0 && !config().progress.isShowWhenZero()) { data.putInt(I_MAX_W, config().inventory.getMaxWidth()); data.putInt(I_MAX_H, config().inventory.getMaxHeight()); - tooltip.add(new RenderableTextComponent(MeganeWaila.INVENTORY, data)); + tooltip.add(new RenderableTextComponent(Megane.INVENTORY, data)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/CauldronComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/CauldronComponent.java index a5a823d..1b76101 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/CauldronComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/CauldronComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.block.BlockState; @@ -36,7 +36,7 @@ protected void append(List tooltip, IDataAccessor accessor) { TAG.putDouble(B_STORED, level); TAG.putDouble(B_MAX, 3); TAG.putString(B_PREFIX, I18n.translate("megane.level")); - tooltip.add(new RenderableTextComponent(MeganeWaila.BAR, TAG)); + tooltip.add(new RenderableTextComponent(Megane.BAR, TAG)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ComposterComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ComposterComponent.java index 5fe9cdf..f78dc42 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ComposterComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ComposterComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.block.BlockState; @@ -36,7 +36,7 @@ protected void append(List tooltip, IDataAccessor accessor) { TAG.putDouble(B_STORED, level); TAG.putDouble(B_MAX, 7); TAG.putString(B_PREFIX, I18n.translate("megane.level")); - tooltip.add(new RenderableTextComponent(MeganeWaila.BAR, TAG)); + tooltip.add(new RenderableTextComponent(Megane.BAR, TAG)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/EnergyComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/EnergyComponent.java index dc9ff51..e9e7884 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/EnergyComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/EnergyComponent.java @@ -5,7 +5,7 @@ import badasintended.megane.api.provider.EnergyInfoProvider; import badasintended.megane.config.MeganeConfig; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.client.resource.language.I18n; @@ -78,7 +78,7 @@ protected void append(List tooltip, IDataAccessor accessor) { TAG.putDouble(B_MAX, max); TAG.putBoolean(B_LONG, expand); TAG.putString(B_UNIT, unit); - tooltip.add(new RenderableTextComponent(MeganeWaila.BAR, TAG)); + tooltip.add(new RenderableTextComponent(Megane.BAR, TAG)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/FluidComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/FluidComponent.java index 6b3365f..7f9eb69 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/FluidComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/FluidComponent.java @@ -5,7 +5,7 @@ import badasintended.megane.api.provider.FluidInfoProvider; import badasintended.megane.api.registry.TooltipRegistry; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.fluid.Fluid; @@ -90,7 +90,7 @@ protected void append(List tooltip, IDataAccessor accessor) { TAG.putBoolean(B_LONG, expand); TAG.putString(B_PREFIX, name); - tooltip.add(new RenderableTextComponent(MeganeWaila.BAR, TAG)); + tooltip.add(new RenderableTextComponent(Megane.BAR, TAG)); } } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ProgressComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ProgressComponent.java index 864276c..a422703 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ProgressComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/block/ProgressComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IDataAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.nbt.CompoundTag; @@ -22,7 +22,7 @@ public ProgressComponent() { protected void append(List tooltip, IDataAccessor accessor) { CompoundTag data = accessor.getServerData(); if (data.getBoolean(P_HAS) && (data.getInt(P_PERCENT) > 0 || config().progress.isShowWhenZero())) { - tooltip.add(new RenderableTextComponent(MeganeWaila.PROGRESS, data)); + tooltip.add(new RenderableTextComponent(Megane.PROGRESS, data)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/EntityInventoryComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/EntityInventoryComponent.java index 70bf3af..f43bb60 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/EntityInventoryComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/EntityInventoryComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IEntityAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.nbt.CompoundTag; @@ -25,7 +25,7 @@ protected void append(List tooltip, IEntityAccessor accessor) { if (data.getBoolean(I_HAS)) { data.putInt(I_MAX_W, config().entityInventory.getMaxWidth()); data.putInt(I_MAX_H, config().entityInventory.getMaxHeight()); - tooltip.add(new RenderableTextComponent(MeganeWaila.INVENTORY, data)); + tooltip.add(new RenderableTextComponent(Megane.INVENTORY, data)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/PetOwnerComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/PetOwnerComponent.java index a50a0ff..ff4d506 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/PetOwnerComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/PetOwnerComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IEntityAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.client.resource.language.I18n; @@ -34,7 +34,7 @@ protected void append(List tooltip, IEntityAccessor accessor) { if (data.getBoolean(O_HAS)) { TAG.putString(T_KEY, I18n.translate("megane.owner")); TAG.putString(T_VAL, data.getString(O_NAME)); - tooltip.add(new RenderableTextComponent(MeganeWaila.ALIGNED, TAG)); + tooltip.add(new RenderableTextComponent(Megane.ALIGNED, TAG)); } } diff --git a/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/StatusEffectComponent.java b/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/StatusEffectComponent.java index c8fae26..ded9c82 100644 --- a/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/StatusEffectComponent.java +++ b/megane-runtime/src/main/java/badasintended/megane/runtime/component/entity/StatusEffectComponent.java @@ -2,7 +2,7 @@ import java.util.List; -import badasintended.megane.runtime.MeganeWaila; +import badasintended.megane.runtime.Megane; import mcp.mobius.waila.api.IEntityAccessor; import mcp.mobius.waila.api.RenderableTextComponent; import net.minecraft.nbt.CompoundTag; @@ -30,7 +30,7 @@ protected void append(List tooltip, IEntityAccessor accessor) { data.putString(S_LV_STR + i, str); } - tooltip.add(new RenderableTextComponent(MeganeWaila.EFFECT, data)); + tooltip.add(new RenderableTextComponent(Megane.EFFECT, data)); } } diff --git a/megane-runtime/src/main/resources/fabric.mod.json b/megane-runtime/src/main/resources/fabric.mod.json index f5ca05e..25daec4 100644 --- a/megane-runtime/src/main/resources/fabric.mod.json +++ b/megane-runtime/src/main/resources/fabric.mod.json @@ -18,12 +18,7 @@ "icon" : "assets/megane/icon.png", "environment" : "*", "entrypoints" : { - "main" : [ - "badasintended.megane.runtime.MeganeInit" - ], - "modmenu": [ - "badasintended.megane.runtime.config.MeganeModMenu" - ] + "modmenu": ["badasintended.megane.runtime.config.MeganeModMenu"] }, "mixins" : [ "megane-runtime.mixins.json" @@ -31,15 +26,15 @@ "depends" : { "fabricloader": ">=0.7.4", "minecraft" : "1.16.x", - "waila" : "*", + "wthit" : "*", "megane-api" : "*" }, "custom" : { - "waila:plugins" : { + "waila:plugins": { "id" : "megane:plugin", - "initializer": "badasintended.megane.runtime.MeganeWaila" + "initializer": "badasintended.megane.runtime.Megane" }, - "modmenu": { + "modmenu" : { "parent": "megane" } }