SpongeForge server cannot run on Eclipse


#1

I’m using Java 8 and Eclipse 2018-09. I tried following this document to launch server on IDE and debugging the plugin but it crashed.

Here is what exactly I have done.

  1. Create a new gradle project named “SpongePlugin” and edit the build.gradle file:
build.gradle
buildscript {
    repositories {
        maven {
            name = 'forge'
            url = 'https://files.minecraftforge.net/maven'
        }
    }

    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}

plugins {
    id 'org.spongepowered.plugin' version '0.9.0'
}

dependencies {
    compile 'org.spongepowered:spongeforge:1.12.2-2768-7.1.5:dev'
}

apply plugin: 'net.minecraftforge.gradle.forge'

minecraft {
    forgeVersion = '1.12.2-14.23.5.2768'
    mappings = 'snapshot_20171003'
}
  1. Refresh gradle project and run this command:
gradlew setupDecompWorkspace eclipse
  1. It shows:
    MISSING REPLACEMENT DATA FOR RUN_DIR
    and:
    BUILD FAILED
    So I have to refer to Forge MDK and edit the build.gradle file:
minecraft {
    forgeVersion = '1.12.2-14.23.5.2768'
    mappings = 'snapshot_20171003'
    runDir = "run"
}

Then I repeat step 2 and it works fine.

  1. Create a package “com.example” and copy the example from the tutorial to it:
ExamplePlugin.java
package com.example;

import org.apache.logging.log4j.Logger;
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.game.state.GameStartedServerEvent;
import org.spongepowered.api.plugin.Plugin;

import com.google.inject.Inject;

@Plugin(id = "exampleplugin", name = "Example Plugin", version = "1.0", description = "Example")
public class ExamplePlugin {
	
	@Inject
	private Logger logger;
	
	@Listener
	public void onServerStart(GameStartedServerEvent event) {
		logger.info("Successfully running ExamplePlugin!!!");
	}
	
}
  1. Launch server with run configuration “SpongePlugin_Server”. It crashes with this log:
log
[12:15:46] [main/FATAL] [mixin]: Mixin apply failed mixins.common.core.json:world.MixinWorld -> net.minecraft.world.World: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException @Shadow method getChunk in mixins.common.core.json:world.MixinWorld was not located in the target class net.minecraft.world.World. No refMap loaded.
org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: @Shadow method getChunk in mixins.common.core.json:world.MixinWorld was not located in the target class net.minecraft.world.World. No refMap loaded.
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:387) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachShadowMethod(MixinPreProcessorStandard.java:360) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:293) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:261) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:241) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1144) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:267) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:353) ~[mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.apply(MixinTransformer.java:724) [mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.applyMixins(MixinTransformer.java:703) [mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:509) [mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	at org.spongepowered.asm.mixin.transformer.Proxy.transform(Proxy.java:72) [mixin-0.7.11-SNAPSHOT.jar:0.7.11-SNAPSHOT+unknown-b0.git-unknown]
	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_172]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [?:1.8.0_172]
	at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_172]
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) [?:1.8.0_172]
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048) [?:1.8.0_172]
	at java.lang.Class.getMethod0(Class.java:3018) [?:1.8.0_172]
	at java.lang.Class.getMethod(Class.java:1784) [?:1.8.0_172]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:132) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStartServer.main(GradleStartServer.java:10) [start/:?]
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [mixins.common.core.json:world.MixinWorld] from phase [DEFAULT] in config [mixins.common.core.json] FAILED during APPLY
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.handleMixinError(MixinTransformer.java:779)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.handleMixinApplyError(MixinTransformer.java:732)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:513)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at org.spongepowered.asm.mixin.transformer.Proxy.transform(Proxy.java:72)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.Class.getDeclaredMethods0(Native Method)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.Class.getMethod0(Class.java:3018)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.Class.getMethod(Class.java:1784)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:132)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[12:15:46] [main/INFO] [STDERR]: [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: 	at GradleStartServer.main(GradleStartServer.java:10)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: @Shadow method getChunk in mixins.common.core.json:world.MixinWorld was not located in the target class net.minecraft.world.World. No refMap loaded.
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:387)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachShadowMethod(MixinPreProcessorStandard.java:360)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:293)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:261)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:241)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1144)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:267)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:353)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.apply(MixinTransformer.java:724)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.applyMixins(MixinTransformer.java:703)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:509)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:634]: 	... 18 more
Exception in thread "main" [12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.reflect.InvocationTargetException
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at GradleStartServer.main(GradleStartServer.java:10)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.NoClassDefFoundError: net/minecraft/world/World
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.Class.getDeclaredMethods0(Native Method)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.Class.getMethod0(Class.java:3018)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.Class.getMethod(Class.java:1784)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:132)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[12:15:46] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: 	... 6 more
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]: Caused by: java.lang.ClassNotFoundException: net.minecraft.world.World
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]: 	... 13 more
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:667]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:667]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:521)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:667]: 	at org.spongepowered.asm.mixin.transformer.Proxy.transform(Proxy.java:72)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:667]: 	at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:667]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:667]: 	... 15 more
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [mixins.common.core.json:world.MixinWorld] from phase [DEFAULT] in config [mixins.common.core.json] FAILED during APPLY
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.handleMixinError(MixinTransformer.java:779)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.handleMixinApplyError(MixinTransformer.java:732)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:513)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	... 18 more
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: @Shadow method getChunk in mixins.common.core.json:world.MixinWorld was not located in the target class net.minecraft.world.World. No refMap loaded.
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:387)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachShadowMethod(MixinPreProcessorStandard.java:360)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:293)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:261)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:241)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1144)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:267)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:353)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.apply(MixinTransformer.java:724)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.applyMixins(MixinTransformer.java:703)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:509)
[12:15:46] [main/INFO] [STDERR]: [java.lang.Throwable:printEnclosedStackTrace:709]: 	... 18 more

I think I was strictly following the tutorial but it just won’t work. Could someone please tell me how to fix this?


#2

That’s an old version of mappings. Sponge’s stable-7 branch currently uses snapshot_20180808


#3

Many thanks to you. It finally works!
Besides, I’d like to know how to figure out these two values by myself (in the future maybe)?

minecraft {
    // TODO: Configure Forge build here
    forgeVersion = '2705'
    // TODO: Replace with your mappings version, e.g. stable_39 or snapshot_20180814
    mappings = 'YOUR_MAPPINGS_VERSION'
}

And this configuration won’t actually work due to lack of “runDir” (not be mentioned in the tutorial). However, even if I add this value, it’ll still give a warn like
Version string 'unspecified' does not match SemVer specification
(not be mentioned also).
How to improve this?


#4

The Forge version number is included in the SpongeForge version.

To fix the SemVer warning, set your project’s version in build.gradle using version 'x.y.z' (replace x, y, and z with actual numbers).


#5

How to figure out the mapping version of each build? Do I have to check it on github?