[19:02:58 ERROR] [gss]: [ACF] Caused by: java.lang.NoSuchMethodError: net.minecraft.item.ItemStack.getTagCompound()Lnet/minecraft/nbt/NBTTagCompound;
I get this error. why?
I use these settings for mapping for GradleForge
minecraft {
version = “1.11.2”
mappings = “stable_32”
}
and gradle setupDecompWorkspace/gradle clean build
is this how im supposed to do it or is reobfuscation different?
Output from gradle clean build
This mapping ‘stable_32’ was designed for MC 1.11! Use at your own peril.
:clean
:deobfCompileDummyTask
:deobfProvidedDummyTask
:compileKotlin
Using Kotlin incremental compilation
:generateMetadata
:sourceMainJava
:compileJava NO-SOURCE
:processResources
:classes
:jar
:compileTestKotlin NO-SOURCE
:sourceTestJava
:compileTestJava NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
:test NO-SOURCE
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:reobfJar
:extractRangemapReplacedMain NO-SOURCE
:retromapReplacedMain NO-SOURCE
:sourceJar
:assemble
:check UP-TO-DATE
:shadowJar
The SimpleWorkResult type has been deprecated and is scheduled to be removed in Gradle 5.0. Please use WorkResults.didWork() instead.
:build
BUILD SUCCESSFUL in 54s
12 actionable tasks: 12 executed
Post at least your build.gradl
Btw you don’t need to run setupDecompWorkspace every time, just run gradle build
buildscript {
ext.kotlin_version = "1.2.0"
repositories {
mavenCentral()
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT"
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.1"
}
}
plugins {
id "org.spongepowered.plugin" version "0.8.1"
id "net.minecrell.vanillagradle.server" version "2.2-6"
}
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "java"
apply plugin: "kotlin"
group "gss"
version "1.0-SNAPSHOT"
sourceCompatibility = 1.8
kotlin {
experimental {
coroutines 'enable'
}
}
repositories {
mavenCentral()
mavenLocal()
jcenter()
flatDir {
dirs "lib"
}
maven {
name = "sponge"
url = "https://repo.spongepowered.org/maven"
}
maven { url = "https://repo.aikar.co/nexus/content/groups/aikar/" }
}
sourceSets {
main.java.srcDirs = ["src/java"]
main.kotlin.srcDirs = ["src/kotlin"]
main.resources.srcDirs = ["src/resources"]
}
configurations {
provided
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile "com.github.kittinunf.fuel:fuel:1.10.0"
compile "com.github.kittinunf.fuel:fuel-gson:1.10.0"
compile "com.github.salomonbrys.kotson:kotson:2.5.0"
compile group: "org.mongodb", name: "mongo-java-driver", version: "3.5.0"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:0.20"
compile "org.mongodb.morphia:morphia:1.3.2"
compile "redis.clients:jedis:2.9.0"
provided "org.spongepowered:spongeapi:6.0.0"
compile "nl.komponents.kovenant:kovenant:3.3.0"
compile "co.aikar:acf-core:0.5.0-SNAPSHOT"
compile "co.aikar:acf-sponge:0.5.0-SNAPSHOT"
//compile files("lib/spongevanilla-11.jar")
configurations.compile.extendsFrom(configurations.provided)
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
minecraft {
version = "1.11.2"
// TODO: Replace with your mappings version, e.g. snapshot_20170120
mappings = "stable_32"
}
shadowJar {
relocate "co.aikar.commands", "gss.acf"
}
build.dependsOn shadowJar
task coreJar(type: Jar) {
manifest {
attributes "Implementation-Title": "gss-core",
"Implementation-Version": version,
"Main-Class": "gss.SagaKt"
}
baseName = project.name + "-core"
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
opened 09:06PM - 27 Jun 17 UTC
closed 01:08AM - 28 Jun 17 UTC
The functions replace and replaceIn in the minecraft block do not appear to operate on the Kotlin source set. Everything compiles...
I found that gradleforge does not allow kotlin by default
topic done thx
It’s not kotlin. Forgegradle doesn’t work with that shadow plugin, it won’t obfuscate the sources
phit
December 18, 2017, 6:23pm
7
yep, add this to your build.gradle
reobf {
shadowJar{}
}
tasks.build.dependsOn reobfShadowJar
3 Likes