Closed Gxorge closed 6 years ago
(Oh and also I'm building the mod Gradle. I have tried using shadowjar as well and that hasn't worked)
It looks like you are missing the dependency for the natives, please post your build.gradle for reference.
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT"
classpath "com.github.jengelman.gradle.plugins:shadow:1.2.4"
classpath "club.minnced:java-discord-rpc:2.0.1"
}
}
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "java"
/*
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/
version = "1.0"
group = "curiousclient" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "CuriousClient"
sourceCompatibility = targetCompatibility = 1.8
shadowJar {
relocate 'org.apache.commons', 'curiousclient.apache'
classifier ''
}
repositories {
maven { url 'https://jitpack.io' }
jcenter()
}
minecraft {
version = "1.8.9-11.15.1.1722"
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "stable_20"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
reobf {
shadowJar {}
}
dependencies {
compile "club.minnced:java-discord-rpc:2.0.1"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
artifacts {
shadowJar
}
Also the plugin does work when I run buildClient. Everything works fine when I do that
Multiple things to point out here:
(Sorry I'm a bit stupid) So I've removed jitpack from the dependencies, what else do I need to do (with the processResources?)
^ I have also removed this library from the buildScript
Sorry, but what exactly do I need to put in the processResources? I've looked around the internet a bit and I can't really find what to put in it? Thanks
It looks like all the libraries are loaded into the jar. Make sure your platform is listed in the supported platforms: linux-x86-64
, win32-x86-64
, win32-x86
, and darwin
Yup, it’s in that list.
But going back to what you said earlier ("Your processResources does not include resources from dependencies (this is your biggest issue)"). What exactly do I need to put in the processResources?
I misunderstood how processResources works, it actually doesn't even use dependencies since the jars are essentially resources them-self already.
So do we know what is potentially wrong then? Or is this just an issue unrelated to this library?
I've moved to a different library as I just couldn't get this one to work. Thanks for all the help, anyway
It looks to me like you were using an out-dated version of JNA which was not loading the library properly. You could've tried using -Djna.debug_load=true
to see where it fails as well. This is really an issue with your setup and I can't help there.
Hello,
I'm trying to make a Minecraft mod that includes this library and I keep getting this error
Then in console I get this error:
Anyone know what I'm doing wrong?
Thanks, George