打包后报错(其实是1.12.2,具体见正文)

shBLOCK


版本信息
你使用的系统:Windows 64位
你用的JDK是: JDK8 64位
你使用的IDE:IntelliJ IDEA
你使用的IDE版本:2020.2.3
Forge版本: 1.12.2 - 14.23.5.2847
Minecraft版本: 1.12.2(我知道应该升级了,但是1.12的我原来已经做了一大半了,所以我想把它弄完)
Mapping 文件版本: stable_39

错误情况简述
看日志是mod被注册了两边?
这个问题只在打包为jar后出现,在idea里完全没问题。

报错日志

java.lang.IllegalArgumentException: Multiple entries with same key: block_transporter=FMLMod:block_transporter{0.0.1} and block_transporter=FMLMod:block_transporter{0.0.1}. To index multiple values under a key, use Multimaps.index.
	at com.google.common.collect.Maps.uniqueIndex(Maps.java:1385)
	at com.google.common.collect.Maps.uniqueIndex(Maps.java:1341)
	at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:429)
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at com.google.common.collect.Maps.uniqueIndex(Maps.java:1385)
	at com.google.common.collect.Maps.uniqueIndex(Maps.java:1341)
	at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:429)
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_271, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 3625771000 bytes (3457 MB) / 4461166592 bytes (4254 MB) up to 7548174336 bytes (7198 MB)
	JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms4096m -Xmx8098m
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.5.2854 6 mods loaded, 0 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State | ID                | Version      | Source                                  | Signature                                |
	|:----- |:----------------- |:------------ |:--------------------------------------- |:---------------------------------------- |
	|       | minecraft         | 1.12.2       | minecraft.jar                           | None                                     |
	|       | mcp               | 9.42         | minecraft.jar                           | None                                     |
	|       | FML               | 8.0.99.99    | forge-1.12.2-14.23.5.2854-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	|       | forge             | 14.23.5.2854 | forge-1.12.2-14.23.5.2854-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	|       | block_transporter | 0.0.1        | modid-1.0.jar                           | None                                     |
	|       | block_transporter | 0.0.1        | modid-1.0.jar                           | None                                     |

相关代码
真的不知道什么是相关的…


FledgeXu



FledgeXu


本论坛不再提供1.12的支持,请迁移到1.16版本。