写模组报错了,求救!
本帖最后由 Yaili 于 2024-10-25 22:32 编辑ps:加了geckolib,模组只有播放音效和右键方块的功能,不知道那里出的问题
有不兼容的模组! (Incompatible mods found!)
net.fabricmc.loader.impl.FormattedException: net.fabricmc.loader.impl.discovery.ModResolutionException: Mod discovery failed!
at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63)
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:198)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:146)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: net.fabricmc.loader.impl.discovery.ModResolutionException: Mod discovery failed!
at net.fabricmc.loader.impl.discovery.ModDiscoverer.lambda$discoverMods$1(ModDiscoverer.java:153)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.discovery.ModDiscoverer.discoverMods(ModDiscoverer.java:153)
at net.fabricmc.loader.impl.FabricLoaderImpl.setup(FabricLoaderImpl.java:216)
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:193)
... 4 more
Caused by: net.fabricmc.loader.impl.metadata.ParseMetadataException: Error reading fabric.mod.json file for mod at C:\Users\Administrator\Desktop\YailiMod\build\resources\main: net.fabricmc.loader.impl.lib.gson.MalformedJsonException: Expected name at line 37 column 3 path $.depends.fabric-api
at net.fabricmc.loader.impl.metadata.ModMetadataParser.parseMetadata(ModMetadataParser.java:56)
at net.fabricmc.loader.impl.discovery.ModDiscoverer$ModScanTask.parseMetadata(ModDiscoverer.java:508)
at net.fabricmc.loader.impl.discovery.ModDiscoverer$ModScanTask.computeDir(ModDiscoverer.java:312)
at net.fabricmc.loader.impl.discovery.ModDiscoverer$ModScanTask.compute(ModDiscoverer.java:286)
at net.fabricmc.loader.impl.discovery.ModDiscoverer$ModScanTask.compute(ModDiscoverer.java:247)
at java.base/java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:100)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: net.fabricmc.loader.impl.lib.gson.MalformedJsonException: Expected name at line 37 column 3 path $.depends.fabric-api
at net.fabricmc.loader.impl.lib.gson.JsonReader.syntaxError(JsonReader.java:1570)
at net.fabricmc.loader.impl.lib.gson.JsonReader.doPeek(JsonReader.java:505)
at net.fabricmc.loader.impl.lib.gson.JsonReader.hasNext(JsonReader.java:414)
at net.fabricmc.loader.impl.metadata.V1ModMetadataParser.readDependenciesContainer(V1ModMetadataParser.java:443)
at net.fabricmc.loader.impl.metadata.V1ModMetadataParser.parse(V1ModMetadataParser.java:151)
at net.fabricmc.loader.impl.metadata.ModMetadataParser.readModMetadata(ModMetadataParser.java:141)
at net.fabricmc.loader.impl.metadata.ModMetadataParser.readModMetadata(ModMetadataParser.java:104)
at net.fabricmc.loader.impl.metadata.ModMetadataParser.parseMetadata(ModMetadataParser.java:44)
... 10 more
以下仅供参考
你遇到的这个报错提示是在使用Fabric相关模组(mod)时出现的问题哦。主要原因是模组发现(Mod discovery)失败了,进一步看是在读取某个模组的 fabric.mod.json 文件时出错啦。具体是在解析这个文件里关于依赖(depends) fabric-api 的部分,在第37行第3列的地方出现了格式不正确的情况,也就是 net.fabricmc.loader.impl.lib.gson.MalformedJsonException: Expected name 这个错误。
你可以检查一下对应模组的 fabric.mod.json 文件里关于依赖 fabric-api 的配置部分,看看是不是格式写得不对,比如少了某个属性的名称之类的,修改正确后再试试能不能正常加载模组哦。
页: [1]