版本信息
使用的系统: windows 10 64
是用的JDK: 1.8.0_252 64
使用的IDE:IntelliJ IDEA
使用的IDE版本: 2020.2
Forge版本: 28.2.3
Minecraft版本: 1.14
出错图
错误情况简述
在 IDEA 中运行调试中的 runClient 时发生错误
报错日志
[18:08:04] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190829.143755, --fml.mcVersion, 1.14.4, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 28.2.3, --version, MOD_DEV, --assetIndex, 1.14, --assetsDir, C:\Users\15881\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[18:08:04] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 4.1.0+62+5bfa59b starting: java version 1.8.0_202 by Oracle Corporation
[18:08:04] [main/DEBUG] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Found launch services [minecraft,fmldevdata,fmldevclient,fmldevserver,fmluserdevserver,testharness,fmluserdevdata,fmlclient,fmluserdevclient,fmlserver]
[18:08:04] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp]
[18:08:04] [main/DEBUG] [cp.mo.mo.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [eventbus,object_holder_definalize,runtime_enum_extender,accesstransformer,capability_inject_definalize,runtimedistcleaner]
[18:08:04] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services
[18:08:04] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Found additional transformation services from discovery services: []
[18:08:05] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Found transformer services : [fml]
[18:08:05] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services loading
[18:08:05] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loading service fml
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/]: Injecting tracing printstreams for STDOUT/STDERR.
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.LauncherVersion/CORE]: Found FMLLauncher version 28.2
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML 28.2 loading
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found ModLauncher version : 4.1.0+62+5bfa59b
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Initializing modjar URL handler
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found AccessTransformer version : 1.0.5+4+02b7b69
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found EventBus version : 1.0.0+54+3f83a9e
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found Runtime Dist Cleaner
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found CoreMod version : 1.0.0+4+e6fed88
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found ForgeSPI package implementation version 1.5.0+6+478760f
[18:08:05] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found ForgeSPI package specification 3
[18:08:05] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[18:08:05] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loaded service fml
[18:08:05] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Configuring option handling for services
[18:08:06] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services initializing
[18:08:06] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service fml
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Setting up basic FML game directories
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing GAMEDIR directory : E:\!ModForMinecarftPc\build\run
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path GAMEDIR is E:\!ModForMinecarftPc\build\run
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing MODSDIR directory : E:\!ModForMinecarftPc\build\run\mods
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path MODSDIR is E:\!ModForMinecarftPc\build\run\mods
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing CONFIGDIR directory : E:\!ModForMinecarftPc\build\run\config
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path CONFIGDIR is E:\!ModForMinecarftPc\build\run\config
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path FMLCONFIG is E:\!ModForMinecarftPc\build\run\config\fml.toml
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Loading configuration
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing default config directory directory : E:\!ModForMinecarftPc\build\run\defaultconfigs
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Preparing launch handler
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Using fmluserdevclient as launch service
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Received command line version data : MC Version: '1.14.4' MCP Version: '20190829.143755' Forge Version: '28.2.3' Forge group: 'net.minecraftforge'
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.LibraryFinder/CORE]: Found JAR forge at path C:\Users\15881\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.2.3_mapped_snapshot_20200512-1.15.1\forge-1.14.4-28.2.3_mapped_snapshot_20200512-1.15.1-recomp.jar
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.LibraryFinder/CORE]: Found JAR mcdata at path C:\Users\15881\.gradle\caches\forge_gradle\minecraft_repo\versions\1.14.4\client-extra.jar
[18:08:06] [main/DEBUG] [ne.mi.us.FMLUserdevLaunchProvider/CORE]: Injecting maven path C:\Users\15881\.gradle\caches\forge_gradle\minecraft_user_repo
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLCommonLaunchHandler/CORE]: Got mod coordinates examplemod%%E:/!ModForMinecarftPc/build\out\production\resources;examplemod%%E:/!ModForMinecarftPc/build\out\production\classes from env
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLCommonLaunchHandler/CORE]: Found supplied mod coordinates [{examplemod=[E:\!ModForMinecarftPc\build\out\production\resources, E:\!ModForMinecarftPc\build\out\production\classes]}]
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found 2 language providers
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found language provider javafml, version 28.2
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found language provider minecraft, version 1
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Skipping adding forge jar - javafml is already present
[18:08:06] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformation service fml
[18:08:06] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Current naming domain is 'mcp'
[18:08:06] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Identified name mapping providers {srg=srgtomcp:1234}
[18:08:06] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services begin scanning
[18:08:06] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Beginning scan trigger - transformation service fml
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Initiating mod scan
[18:08:06] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/SCAN]: Scanning for Mod Locators
Exception in thread "main" [18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.IllegalArgumentException: Missing scheme
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.nio.file.Paths.get(Paths.java:134)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.LibraryFinder.findJarPathFor(LibraryFinder.java:58)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.userdev.ClasspathLocator.locateMods(ClasspathLocator.java:81)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.userdev.ClasspathLocator.initArguments(ClasspathLocator.java:69)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.lambda$new$7(ModDiscoverer.java:87)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.ArrayList.forEach(ArrayList.java:1257)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.<init>(ModDiscoverer.java:87)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:207)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.FMLServiceProvider.runScan(FMLServiceProvider.java:105)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:111)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:115)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1628)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:116)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:63)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:75)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
[18:08:06] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)
看错误日志应该是在寻找mod时候出错。
请你补充一下:mods.toml
和Gem.java
文件里的内容。
看你的截图,好像环境没有配置成功。
请问你是怎么配置环境的,请简述一下。
mods.homl
# This is an example mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[28,)" #mandatory (28 is current forge version)
# A URL to refer people to when problems occur with this mod
issueTrackerURL="http://my.issue.tracker/" #optional
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
# The modid of the mod
modId="Gem" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="${file.jarVersion}" #mandatory
# A display name for the mod
displayName="Gem" #mandatory
# A URL to query for updates for this mod. See the JSON update specification <here>
updateJSONURL="http://myurl.me/" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
displayURL="http://example.com/" #optional
# A file name (in the root of the mod JAR) containing a logo for display
logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
credits="Thanks for this example mod goes to Java" #optional
# A text field displayed in the mod UI
authors="FledgeShiu" #optional
# The description text for the mod (multi line!) (#mandatory)
description='''
测试
'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.examplemod]] #optional
# the modid of the dependency
modId="forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="[28,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
side="BOTH"
# Here's another dependency
[[dependencies.examplemod]]
modId="minecraft"
mandatory=true
versionRange="[1.14.4]"
ordering="NONE"
side="BOTH"
Gem.java
package com.Cara.Gem;
public class Gem {
}
这张截图看起来没问题了。
我建议你好好读一下 自定义mod信息 - Minecraft Forge Mod Dev tutorial 。
我目前至少看见了两个错误。
- ModID 用了大写字符
- 你的主类没有加上
@mod
注释
注意这个教程是1.15版本的,mapping文件与1.14不同
你好,很抱歉再次打扰你
为了防止玄学问题,目前我更换为
Forge版本: 31.2.0
Minecraft版本: 1.15
并且 src -> mian 文件夹内的代码都为开发包自带内容,未经修改
可是问题依旧是和之前一样运行编译时依旧如此
[21:17:28] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20200515.085601, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 31.2.0, --version, MOD_DEV, --assetIndex, 1.15, --assetsDir, C:\Users\15881\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[21:17:28] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 5.1.0+69+master.79f13f7 starting: java version 1.8.0_252 by AdoptOpenJDK
[21:17:28] [main/DEBUG] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Found launch services [minecraft,fmldevdata,fmldevclient,fmldevserver,fmluserdevserver,testharness,fmluserdevdata,fmlclient,fmluserdevclient,fmlserver]
[21:17:28] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp]
[21:17:28] [main/DEBUG] [cp.mo.mo.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [eventbus,object_holder_definalize,runtime_enum_extender,accesstransformer,capability_inject_definalize,runtimedistcleaner]
[21:17:28] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services
[21:17:28] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Found additional transformation services from discovery services: []
[21:17:28] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Found transformer services : [fml]
[21:17:28] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services loading
[21:17:28] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loading service fml
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/]: Injecting tracing printstreams for STDOUT/STDERR.
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.LauncherVersion/CORE]: Found FMLLauncher version 31.2
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML 31.2 loading
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found ModLauncher version : 5.1.0+69+master.79f13f7
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Initializing modjar URL handler
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found AccessTransformer version : 2.1.1+55+master.08d32b9
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found EventBus version : 2.2.0+59+master.4f71e48
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found Runtime Dist Cleaner
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found CoreMod version : 2.0.3+8+master.ca72757
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found ForgeSPI package implementation version 2.1.2+9+master.a8b4d92
[21:17:28] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found ForgeSPI package specification 3
[21:17:29] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[21:17:29] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loaded service fml
[21:17:29] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Configuring option handling for services
[21:17:29] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services initializing
[21:17:29] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service fml
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Setting up basic FML game directories
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing GAMEDIR directory : E:\!ModForMinecarftPc\build\run
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path GAMEDIR is E:\!ModForMinecarftPc\build\run
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing MODSDIR directory : E:\!ModForMinecarftPc\build\run\mods
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path MODSDIR is E:\!ModForMinecarftPc\build\run\mods
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing CONFIGDIR directory : E:\!ModForMinecarftPc\build\run\config
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path CONFIGDIR is E:\!ModForMinecarftPc\build\run\config
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path FMLCONFIG is E:\!ModForMinecarftPc\build\run\config\fml.toml
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Loading configuration
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing default config directory directory : E:\!ModForMinecarftPc\build\run\defaultconfigs
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Preparing launch handler
[21:17:29] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Using fmluserdevclient as launch service
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Received command line version data : MC Version: '1.15.2' MCP Version: '20200515.085601' Forge Version: '31.2.0' Forge group: 'net.minecraftforge'
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.LibraryFinder/CORE]: Found JAR forge at path C:\Users\15881\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1\forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.LibraryFinder/CORE]: Found JAR mcdata at path C:\Users\15881\.gradle\caches\forge_gradle\minecraft_repo\versions\1.15.2\client-extra.jar
[21:17:35] [main/DEBUG] [ne.mi.us.FMLUserdevLaunchProvider/CORE]: Injecting maven path C:\Users\15881\.gradle\caches\forge_gradle\minecraft_user_repo
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.FMLCommonLaunchHandler/CORE]: Got mod coordinates examplemod%%E:/!ModForMinecarftPc/build\out\production\resources;examplemod%%E:/!ModForMinecarftPc/build\out\production\classes from env
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.FMLCommonLaunchHandler/CORE]: Found supplied mod coordinates [{examplemod=[E:\!ModForMinecarftPc\build\out\production\resources, E:\!ModForMinecarftPc\build\out\production\classes]}]
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found 2 language providers
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found language provider javafml, version 31.2
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found language provider minecraft, version 1
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Skipping adding forge jar - javafml is already present
[21:17:35] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformation service fml
[21:17:35] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Current naming domain is 'mcp'
[21:17:35] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Identified name mapping providers {srg=srgtomcp:1234}
[21:17:35] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services begin scanning
[21:17:35] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Beginning scan trigger - transformation service fml
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Initiating mod scan
[21:17:35] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/SCAN]: Scanning for Mod Locators
Exception in thread "main" [21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.IllegalArgumentException: Missing scheme
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.nio.file.Paths.get(Paths.java:134)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.LibraryFinder.findJarPathFor(LibraryFinder.java:58)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.userdev.ClasspathLocator.locateMods(ClasspathLocator.java:81)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.userdev.ClasspathLocator.initArguments(ClasspathLocator.java:69)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.lambda$new$7(ModDiscoverer.java:87)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.ArrayList.forEach(ArrayList.java:1257)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.<init>(ModDiscoverer.java:87)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:210)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.FMLServiceProvider.runScan(FMLServiceProvider.java:105)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:111)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:115)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1628)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:116)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:63)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:75)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
[21:17:36] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)
mods.toml
# This is an example mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# A URL to refer people to when problems occur with this mod
issueTrackerURL="http://my.issue.tracker/" #optional
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
# The modid of the mod
modId="examplemod" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="${file.jarVersion}" #mandatory
# A display name for the mod
displayName="Example Mod" #mandatory
# A URL to query for updates for this mod. See the JSON update specification <here>
updateJSONURL="http://myurl.me/" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
displayURL="http://example.com/" #optional
# A file name (in the root of the mod JAR) containing a logo for display
logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
credits="Thanks for this example mod goes to Java" #optional
# A text field displayed in the mod UI
authors="Love, Cheese and small house plants" #optional
# The description text for the mod (multi line!) (#mandatory)
description='''
This is a long form description of the mod. You can write whatever you want here
Have some lorem ipsum.
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.
'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.examplemod]] #optional
# the modid of the dependency
modId="forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="[31,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
side="BOTH"
# Here's another dependency
[[dependencies.examplemod]]
modId="minecraft"
mandatory=true
versionRange="[1.15.2]"
ordering="NONE"
side="BOTH"
ExpmpleMod.java
package com.example.examplemod;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.InterModComms;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.stream.Collectors;
// The value here should match an entry in the META-INF/mods.toml file
@Mod("examplemod")
public class ExampleMod
{
// Directly reference a log4j logger.
private static final Logger LOGGER = LogManager.getLogger();
public ExampleMod() {
// Register the setup method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
// Register the enqueueIMC method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
// Register the processIMC method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
// Register the doClientStuff method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
}
private void setup(final FMLCommonSetupEvent event)
{
// some preinit code
LOGGER.info("HELLO FROM PREINIT");
LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
}
private void doClientStuff(final FMLClientSetupEvent event) {
// do something that can only be done on the client
LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings);
}
private void enqueueIMC(final InterModEnqueueEvent event)
{
// some example code to dispatch IMC to another mod
InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
}
private void processIMC(final InterModProcessEvent event)
{
// some example code to receive and process InterModComms from other mods
LOGGER.info("Got IMC {}", event.getIMCStream().
map(m->m.getMessageSupplier().get()).
collect(Collectors.toList()));
}
// You can use SubscribeEvent and let the Event Bus discover methods to call
@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
// do something when the server starts
LOGGER.info("HELLO from server starting");
}
// You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
// Event bus for receiving Registry Events)
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
public static class RegistryEvents {
@SubscribeEvent
public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
// register a new block here
LOGGER.info("HELLO from Register Block");
}
}
}
(帖子被作者删除,如无标记将在 24 小时后自动删除)
(帖子被作者删除,如无标记将在 24 小时后自动删除)
该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。