我可以按照Pixelmon mod的指示运行服务器,即使用伪造启动器。我想为Pixelmon编写Side Mod,并尝试在Eclipse中运行伪造服务器。服务器和客户端可以使用我自己的mod正常运行,除了使用forge进行包装的模版以外,没有其他mod,但是当我将pixelmon jar放入mods文件夹时,它会崩溃(请参见下面的跟踪)。
到目前为止我检查过的内容:
关于我可能做错了什么的任何想法,可以尝试下一个吗?
(来自崩溃日志)
-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Mac OS X (x86_64) version 10.13.4
Java Version: 1.8.0_101, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 774347184 bytes (738 MB) / 900726784 bytes (859 MB) up to 3817865216 bytes (3641 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.4.2705 6 mods loaded, 6 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 |
|:----- |:---------- |:------------ |:----------------------------------- |:--------- |
| UC | minecraft | 1.12.2 | minecraft.jar | None |
| UC | mcp | 9.42 | minecraft.jar | None |
| UC | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.4.2705.jar | None |
| UC | forge | 14.23.4.2705 | forgeSrc-1.12.2-14.23.4.2705.jar | None |
| UC | examplemod | 1.0 | main | None |
| U | pixelmon | 6.3.1 | Pixelmon-1.12.2-6.3.1-universal.jar | None |
Loaded coremods (and transformers):
Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to 'fml,forge'
Type: Dedicated Server (map_server.txt)
在这里追踪
[10:39:42] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: com/pixelmonmod/pixelmon/config/PixelmonConfig
at com.pixelmonmod.pixelmon.storage.PixelmonStorage.<clinit>(PixelmonStorage.java:26) ~[PixelmonStorage.class:?]
at com.pixelmonmod.pixelmon.Pixelmon.<clinit>(Pixelmon.java:121) ~[Pixelmon.class:?]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_101]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_101]
at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:530) ~[forgeSrc-1.12.2-14.23.4.2705.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?]
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) ~[forgeSrc-1.12.2-14.23.4.2705.jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) ~[forgeSrc-1.12.2-14.23.4.2705.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?]
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?]
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:593) ~[Loader.class:?]
at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:332) ~[FMLCommonHandler.class:?]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:552) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.ClassNotFoundException: com.pixelmonmod.pixelmon.config.PixelmonConfig
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
... 36 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: info.pixelmon.repack.ninja.leaping.configurate.objectmapping.ObjectMappingException
at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1728) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.ClassWriter.getMergedType(ClassWriter.java:1698) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.Frame.merge(Frame.java:1530) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.Frame.merge(Frame.java:1441) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1516) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.commons.LocalVariablesSorter.visitMaxs(LocalVariablesSorter.java:165) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1634) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1032) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.accept(ClassReader.java:708) ~[asm-debug-all-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.accept(ClassReader.java:521) ~[asm-debug-all-5.2.jar:5.2]
at net.minecraftforge.fml.common.asm.transformers.DeobfuscationTransformer.transform(DeobfuscationTransformer.java:51) ~[forgeSrc-1.12.2-14.23.4.2705.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
... 36 more
答案 0 :(得分:1)
关于混淆的名称的
Minecraft具有3种命名级别:
- 槽口名称-这些是Minecraft分发时使用的方法和字段的名称。通常像
a.aa
和b.cf2
之类的东西。这是完全模糊的状态- SRG名称-这些是由Forge在运行游戏时执行的运行时反模糊处理过程赋予方法和字段的名称。编译的mod使用这些名称,因为它们在次要版本中保持一致
- MCP名称-这些是您在Eclipse中看到的易读名称。当有人通过IRC上的MCP Bot弄清楚某个字段或方法的作用时,会手工提供这些名称。在运行
时,使用MDK安装Forge开发环境会捕获“当前”映射。gradlew setup
要在开发环境中运行mod,您需要先对它进行模糊处理,将SRG名称更改为MCP名称,以便它可以在开发环境中运行。
有几种方法可以做到这一点:
此处选项4的问题是,尽管我知道它是可能的,但我却无法(而且已经有一段时间没找到)了必要的说明。我现在可以找到的东西,是由那些会做4的人发布的,建议做3。