我正在制作 Minecraft Mod,但出现错误 "mods.toml missing metadata for modid mymod"
I'm making a Minecraft Mod and I get the error "mods.toml missing metadata for modid mymod"
使用 Eclipse 尝试进行测试 mod,一直试图让它正确加载,但它不起作用。
这里是主要的:
@Mod("mymod")
public class mymod
{
public static final String MOD_ID = "mymod";
public static final Logger LOGGER = LogManager.getLogger();
public mymod() {
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus():
MinecraftForge.EVENT_BUS.register(this);
}
}
这是我的 mods.toml:
modLoader="javafml" #mandatory
loaderVersion="[35,)"
license="All rights reserved"
[[mods]] #mandatory
modId="mymod" #mandatory
version="${file.jarVersion}" #mandatory
displayName="test" #mandatory
description='''
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
'''
[[dependencies.mymod]] #optional
modId="forge" #mandatory
mandatory=true #mandatory
versionRange="[35,)" #mandatory
ordering="NONE"
side="BOTH"
[[dependencies.mymod]]
modId="minecraft"
mandatory=true
versionRange="[1.16.4,1.17)"
ordering="NONE"
side="BOTH"
这里是pack.mcmeta:
{
"pack": {
"description": "mymod resources",
"pack_format": 6,
"_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods."
}
}
这是一份崩溃报告:
---- Minecraft Crash Report ----
// Don't do that.
Time: 16/11/21 7:46 PM
Description: Mod loading error has occurred
java.lang.Exception: Mod Loading has failed
at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:85) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.lambda$null(Minecraft.java:513) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.util.Util.acceptOrElse(Util.java:323) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraft.client.Minecraft.lambda$new(Minecraft.java:509) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:113) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:492) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1002) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_302] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_302] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_302] {}
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_302] {}
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService[=15=](FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {}
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
at net.minecraftforge.fml.CrashReportExtender.lambda$dumpModLoadingCrashReport(CrashReportExtender.java:88) ~[forge:?] {re:classloading}
-- NO MOD INFO AVAILABLE --
Details:
Mod File: NO FILE INFO
Failure message: mods.toml missing metadata for modid mymod
Mod Version: NO MOD INFO AVAILABLE
Mod Issue URL: NOT PROVIDED
Exception message: MISSING EXCEPTION MESSAGE
Stacktrace:
at net.minecraftforge.fml.CrashReportExtender.lambda$dumpModLoadingCrashReport(CrashReportExtender.java:88) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_302] {}
at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:86) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.lambda$null(Minecraft.java:513) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.util.Util.acceptOrElse(Util.java:323) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraft.client.Minecraft.lambda$new(Minecraft.java:509) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:113) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:492) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1002) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_302] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_302] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_302] {}
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_302] {}
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService[=15=](FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {}
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
-- System Details --
Details:
Minecraft Version: 1.16.4
Minecraft Version ID: 1.16.4
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_302, Temurin
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin
Memory: 1379058664 bytes (1315 MB) / 1674575872 bytes (1597 MB) up to 3804758016 bytes (3628 MB)
CPUs: 12
JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
ModLauncher: 8.0.6+85+master.325de55
ModLauncher launch target: fmluserdevclient
ModLauncher naming: mcp
ModLauncher services:
/mixin-0.8.2.jar mixin PLUGINSERVICE
/eventbus-3.0.5-service.jar eventbus PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar object_holder_definalize PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar runtime_enum_extender PLUGINSERVICE
/accesstransformers-2.2.0-shadowed.jar accesstransformer PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar capability_inject_definalize PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar runtimedistcleaner PLUGINSERVICE
/mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar fml TRANSFORMATIONSERVICE
FML: 35.1
Forge: net.minecraftforge:35.1.4
FML Language Providers:
javafml@35.1
minecraft@1
Mod List:
client-extra.jar |Minecraft |minecraft |1.16.4 |NONE |a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.|Forge |forge |35.1.4 |NONE |NOSIGNATURE
main |mymod |examplemod |NONE |NONE |NOSIGNATURE
该游戏还尝试加载名为“examplemod”的内容,尽管代码中没有任何此类内容,因为我删除了它。我什至无法进入标题屏幕,但是如果我将 mods.toml 中的 Mod ID 替换为“examplemod”,游戏将启动但我会收到一条错误消息mods.toml
中缺少元数据
我已将其设置为自动构建,因此我认为这不是构建问题。非常感谢您的帮助,非常感谢!
您 client/server 上的 mod jar 似乎仍然包含无效的 mods.toml
文件。在您的崩溃报告中看到 examplemod
可以验证这一点。这可能有多种原因:
- 您只是忘记将 mod jar 移动到 client/server mods 目录。
- 您的 gradle 构建错误地认为您的资源没有更新。
- 您有多个
mods.toml
文件,并且您没有编辑 META-INF/mods.toml
版本,因此您的更改似乎不适用(在旧的 Forge 版本中,mod 描述符文件放在其他地方)。
在任何一种情况下,在命令 window 和 运行 gradlew clean
中打开您的项目目录,然后是 gradlew build
。然后将你的 mod jar 复制到 client/server 然后启动那个 client/server.
好的,我修好了。原来我的一切都是正确的,只是我的 MODID 不应该有 CAPS。出于某种原因,MODID 应该全部小写,无论如何是的。
使用 Eclipse 尝试进行测试 mod,一直试图让它正确加载,但它不起作用。
这里是主要的:
@Mod("mymod")
public class mymod
{
public static final String MOD_ID = "mymod";
public static final Logger LOGGER = LogManager.getLogger();
public mymod() {
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus():
MinecraftForge.EVENT_BUS.register(this);
}
}
这是我的 mods.toml:
modLoader="javafml" #mandatory
loaderVersion="[35,)"
license="All rights reserved"
[[mods]] #mandatory
modId="mymod" #mandatory
version="${file.jarVersion}" #mandatory
displayName="test" #mandatory
description='''
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
'''
[[dependencies.mymod]] #optional
modId="forge" #mandatory
mandatory=true #mandatory
versionRange="[35,)" #mandatory
ordering="NONE"
side="BOTH"
[[dependencies.mymod]]
modId="minecraft"
mandatory=true
versionRange="[1.16.4,1.17)"
ordering="NONE"
side="BOTH"
这里是pack.mcmeta:
{
"pack": {
"description": "mymod resources",
"pack_format": 6,
"_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods."
}
}
这是一份崩溃报告:
---- Minecraft Crash Report ----
// Don't do that.
Time: 16/11/21 7:46 PM
Description: Mod loading error has occurred
java.lang.Exception: Mod Loading has failed
at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:85) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.lambda$null(Minecraft.java:513) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.util.Util.acceptOrElse(Util.java:323) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraft.client.Minecraft.lambda$new(Minecraft.java:509) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:113) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:492) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1002) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_302] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_302] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_302] {}
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_302] {}
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService[=15=](FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {}
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
at net.minecraftforge.fml.CrashReportExtender.lambda$dumpModLoadingCrashReport(CrashReportExtender.java:88) ~[forge:?] {re:classloading}
-- NO MOD INFO AVAILABLE --
Details:
Mod File: NO FILE INFO
Failure message: mods.toml missing metadata for modid mymod
Mod Version: NO MOD INFO AVAILABLE
Mod Issue URL: NOT PROVIDED
Exception message: MISSING EXCEPTION MESSAGE
Stacktrace:
at net.minecraftforge.fml.CrashReportExtender.lambda$dumpModLoadingCrashReport(CrashReportExtender.java:88) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_302] {}
at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:86) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.lambda$null(Minecraft.java:513) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.util.Util.acceptOrElse(Util.java:323) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading}
at net.minecraft.client.Minecraft.lambda$new(Minecraft.java:509) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:113) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:492) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1002) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_302] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_302] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_302] {}
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_302] {}
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService[=15=](FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {}
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
-- System Details --
Details:
Minecraft Version: 1.16.4
Minecraft Version ID: 1.16.4
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_302, Temurin
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin
Memory: 1379058664 bytes (1315 MB) / 1674575872 bytes (1597 MB) up to 3804758016 bytes (3628 MB)
CPUs: 12
JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
ModLauncher: 8.0.6+85+master.325de55
ModLauncher launch target: fmluserdevclient
ModLauncher naming: mcp
ModLauncher services:
/mixin-0.8.2.jar mixin PLUGINSERVICE
/eventbus-3.0.5-service.jar eventbus PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar object_holder_definalize PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar runtime_enum_extender PLUGINSERVICE
/accesstransformers-2.2.0-shadowed.jar accesstransformer PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar capability_inject_definalize PLUGINSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar runtimedistcleaner PLUGINSERVICE
/mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE
/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-launcher.jar fml TRANSFORMATIONSERVICE
FML: 35.1
Forge: net.minecraftforge:35.1.4
FML Language Providers:
javafml@35.1
minecraft@1
Mod List:
client-extra.jar |Minecraft |minecraft |1.16.4 |NONE |a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.|Forge |forge |35.1.4 |NONE |NOSIGNATURE
main |mymod |examplemod |NONE |NONE |NOSIGNATURE
该游戏还尝试加载名为“examplemod”的内容,尽管代码中没有任何此类内容,因为我删除了它。我什至无法进入标题屏幕,但是如果我将 mods.toml 中的 Mod ID 替换为“examplemod”,游戏将启动但我会收到一条错误消息mods.toml
中缺少元数据我已将其设置为自动构建,因此我认为这不是构建问题。非常感谢您的帮助,非常感谢!
您 client/server 上的 mod jar 似乎仍然包含无效的 mods.toml
文件。在您的崩溃报告中看到 examplemod
可以验证这一点。这可能有多种原因:
- 您只是忘记将 mod jar 移动到 client/server mods 目录。
- 您的 gradle 构建错误地认为您的资源没有更新。
- 您有多个
mods.toml
文件,并且您没有编辑META-INF/mods.toml
版本,因此您的更改似乎不适用(在旧的 Forge 版本中,mod 描述符文件放在其他地方)。
在任何一种情况下,在命令 window 和 运行 gradlew clean
中打开您的项目目录,然后是 gradlew build
。然后将你的 mod jar 复制到 client/server 然后启动那个 client/server.
好的,我修好了。原来我的一切都是正确的,只是我的 MODID 不应该有 CAPS。出于某种原因,MODID 应该全部小写,无论如何是的。