After I set up the Mixin environment following the documentation. clean, build, run, then i get:
MissingModsException: Mod survival (survival4mfbl) requires [zyblcommon]
But zyblcommon’s jar files do exist! I removed all mod except spongeforge and zyblcommon.I find the mod zyblcommon
is not loaded, the log is nothing unusual, and the message in the first line of GamePreInitializationEvent
is not printed.
Two tested versions:
forge-1.12.2-14.23.5.2838-universal.jar, spongeforge-1.12.2-2838-7.1.7-RC3906.jar
forge-1.12.2-14.23.5.2768-universal.jar,spongeforge-1.12.2-2768-7.1.6-RC3627.jar
gradle.build, mixins file, mcmod.info, refmap file…
MixinNetworkManager.java
package halo.mfbl.common.mixin;
import halo.mfbl.common.event.PacketEvent;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.network.INetHandler;
import net.minecraft.network.NetHandlerPlayServer;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import org.spongepowered.api.Sponge;
This file has been truncated. show original
gradle.build
buildscript {
repositories {
maven {
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
maven {
name = 'SpongePowered'
url = 'http://repo.spongepowered.org/maven'
This file has been truncated. show original
mcmod.info
[
{
"modid": "zyblcommon",
"name": "common4mfbl",
"version": "1.0.0",
"description": "common4mfbl",
"dependencies": [
"[email protected] "
],
"requiredMods": [
This file has been truncated. show original
There are more than three files. show original
latest.log
latest.log
[20:49:37] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[20:49:37] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[20:49:37] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker
[20:49:37] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading
[20:49:37] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_181
[20:49:37] [main/INFO] [FML]: Searching C:\work\mc_test\lobby_1\.\mods for mods
[20:49:37] [main/INFO] [FML]: Loading tweaker org.spongepowered.asm.launch.MixinTweaker from mfbl_common_plugin-1.0.jar
[20:49:37] [main/INFO] [FML]: Loading tweaker org.spongepowered.asm.launch.MixinTweaker from spongeforge-1.12.2-2768-7.1.6-RC3627.jar
[20:49:37] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:49:37] [main/INFO] [LaunchWrapper]: Loading tweak class name org.spongepowered.asm.launch.MixinTweaker
This file has been truncated. show original
Asking for help, thank you!
Typically when sponge can load the plugin, it states the plugins its loaded. If the plugin can not load, forge will state that its not a “mod” file. Considering both arnt showing up my guess is forge isnt even seeing the plugin.
Maybe its not in the folder? Or read access on the file isnt allowed?
It must be in this folder, because it can be found in the log, You can search mfbl_common_plugin
in the latest.log.
[20:49:37] [main/INFO] [FML]: Loading tweaker org.spongepowered.asm.launch.MixinTweaker from mfbl_common_plugin-1.0.jar
With the help of LX_Gaming
, the problem has been solved and the answer is attached to help others:
Make sure your JAR Manifest has the following:
"FMLCorePluginContainsFMLMod": true
"ForceLoadAsMod": true
those lines are required if are using Mixins but also want your plugin to load.
finally:
jar {
manifest.attributes(
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'MixinConfigs': 'mixins.zyblcommon.json',
'FMLCorePluginContainsFMLMod': 'true',
'ForceLoadAsMod': true,
)
}