Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Dependency Crash?
The update for 1.13 is being worked on - please be patient. (Updated 02/14/19)
Sign in to follow this  
Followers 2
FireController1847

[1.12.2] Dependency Crash?

Started by FireController1847, June 5, 2018

11 posts in this topic

FireController1847    4

FireController1847

FireController1847    4

  • Creeper Killer
  • FireController1847
  • Members
  • 4
  • 247 posts
  • Report post
Posted June 5, 2018 (edited)

Okay, I may be doing this entirely wrong (and I feel kind of bad for making two topics right after each other right before I go to bed), but I am using the "java-discord-rpc" module. I don't think I'm adding it right to build.gradle, but this is all I've done.
 

buildscript {
    repositories {
        jcenter()
        maven { url = "http://files.minecraftforge.net/maven" }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
        classpath 'club.minnced:java-discord-rpc:2.0.0'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "0.1.0"
group = "com.visualfiredev.udp" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Ultimate Discord Pack"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
    version = "1.12.2-14.23.4.2707"
    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 always work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20171003"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

repositories {
  jcenter()
}

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"
      
    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
    // except that these dependencies get remapped to your current MCP mappings
    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html
    compile "club.minnced:java-discord-rpc:2.0.0"

}


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 except the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}


Oh, right, and here's the crash report after I take the JAR from build/libs.

 

---- Minecraft Crash Report ----
// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

Time: 6/5/18 12:15 AM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Ultimate Discord Pack (ultimatediscordpack)
Caused by: java.lang.NoClassDefFoundError: com/visualfiredev/udp/RPC/UDPRichPresence
	at com.visualfiredev.udp.Reference.initiateDimensionNames(Reference.java:35)
	at com.visualfiredev.udp.UltimateDiscordPack.preInit(UltimateDiscordPack.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:627)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:627)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:245)
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Caused by: java.lang.ClassNotFoundException: com.visualfiredev.udp.RPC.UDPRichPresence
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 43 more
Caused by: java.lang.NoClassDefFoundError: club/minnced/discord/rpc/DiscordRichPresence
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
	... 45 more
Caused by: java.lang.ClassNotFoundException: club.minnced.discord.rpc.DiscordRichPresence
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 49 more


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

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_25, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 151264176 bytes (144 MB) / 369098752 bytes (352 MB) up to 8589934592 bytes (8192 MB)
	JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.4.2707 5 mods loaded, 5 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                                |
	|:----- |:------------------- |:------------ |:------------------------------- |:---------------------------------------- |
	| UCH   | minecraft           | 1.12.2       | minecraft.jar                   | None                                     |
	| UCH   | mcp                 | 9.42         | minecraft.jar                   | None                                     |
	| UCH   | FML                 | 8.0.99.99    | forge-1.12.2-14.23.4.2707.jar   | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	| UCH   | forge               | 14.23.4.2707 | forge-1.12.2-14.23.4.2707.jar   | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	| UCEE  | ultimatediscordpack | 0.1.0        | Ultimate Discord Pack-0.1.0.jar | None                                     |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 397.93' Renderer: 'GeForce GTX 960/PCIe/SSE2'

 

Edited June 5, 2018 by FireController1847

Share this post


Link to post
Share on other sites

MDW01    36

MDW01

MDW01    36

  • Diamond Finder
  • MDW01
  • Members
  • 36
  • 418 posts
  • Report post
Posted June 5, 2018

You probably want to add it using maven. They include information on their Github on how to add it to gradle from maven.

dependencies {
    compile 'club.minnced:java-discord-rpc:%VERSION%'
}

 

Share this post


Link to post
Share on other sites

FireController1847    4

FireController1847

FireController1847    4

  • Creeper Killer
  • FireController1847
  • Members
  • 4
  • 247 posts
  • Report post
Posted June 6, 2018 (edited)

I'm sorry to have to ask this but, how do I add it using maven?

I can't understand a lot of these gradle tutorials as they're not for a pure beginner with gradle like me...

Wait, that example you showed is from gradle? Don't I already have that?

Edited June 6, 2018 by FireController1847

Share this post


Link to post
Share on other sites

MDW01    36

MDW01

MDW01    36

  • Diamond Finder
  • MDW01
  • Members
  • 36
  • 418 posts
  • Report post
Posted June 6, 2018

Sorry I could have worded that better. So maven can be used as a build script but it is mainly used as a repository for libraries. The example I gave you is for gradle and it will fetch the library from the maven repository and use it to compile your project. You just have to specify a version.

Share this post


Link to post
Share on other sites

MDW01    36

MDW01

MDW01    36

  • Diamond Finder
  • MDW01
  • Members
  • 36
  • 418 posts
  • Report post
Posted June 6, 2018

Once again I apologize I miss read what you had said. If I understand correctly it works when you run it in your workspace but not when you export the jar. This would be because in your workspace your code has access to the jar but when you export it the Minecraft client can not find the library. To fix this you do what is called shading in dependencies. This copies the library into the jar when you export it so your code can still have access to the library once it has been exported. I recommend you use this Gradle plugin to help you shade in your library. https://github.com/johnrengelman/shadow If you need any help figuring out how to use this let me know.

Share this post


Link to post
Share on other sites

FireController1847    4

FireController1847

FireController1847    4

  • Creeper Killer
  • FireController1847
  • Members
  • 4
  • 247 posts
  • Report post
Posted June 7, 2018 (edited)

I'm not sure whether I should downgrade shadow or upgrade gadle? What do I do?

 

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Users\FireController1847\Development\Git\_CAT Minecraft\_CAT Mods\mc-ultimate-discord-pack\build.gradle' line: 13

* What went wrong:
A problem occurred evaluating root project 'mc-ultimate-discord-pack'.
> Failed to apply plugin [class 'com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin']
   > This version of Shadow supports Gradle 3.0+ only. Please upgrade.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED


This is my build.grade right now
 

buildscript {
    repositories {
        jcenter()
        maven { url = "http://files.minecraftforge.net/maven" }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
        classpath 'club.minnced:java-discord-rpc:2.0.0'
        classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "0.1.0"
group = "com.visualfiredev.udp" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Ultimate Discord Pack"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
    version = "1.12.2-14.23.4.2707"
    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 always work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20171003"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

repositories {
  jcenter()
}

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"
      
    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
    // except that these dependencies get remapped to your current MCP mappings
    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html
    shadow "club.minnced:java-discord-rpc:2.0.0"

}


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 except the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}
Edited June 7, 2018 by FireController1847

Share this post


Link to post
Share on other sites

diesieben07    6101

diesieben07

diesieben07    6101

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6101
  • 40179 posts
  • Report post
Posted June 7, 2018

Update Gradle.

Share this post


Link to post
Share on other sites

FireController1847    4

FireController1847

FireController1847    4

  • Creeper Killer
  • FireController1847
  • Members
  • 4
  • 247 posts
  • Report post
Posted June 7, 2018

How does one do that?

Share this post


Link to post
Share on other sites

diesieben07    6101

diesieben07

diesieben07    6101

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6101
  • 40179 posts
  • Report post
Posted June 7, 2018

If you are using the gradle wrapper simply edit it's properties file.

Share this post


Link to post
Share on other sites

FireController1847    4

FireController1847

FireController1847    4

  • Creeper Killer
  • FireController1847
  • Members
  • 4
  • 247 posts
  • Report post
Posted June 7, 2018 (edited)

Ah, I see. What is the highest version I should go to that is still compatible with ForgeGradle?

Edited June 7, 2018 by FireController1847

Share this post


Link to post
Share on other sites

MDW01    36

MDW01

MDW01    36

  • Diamond Finder
  • MDW01
  • Members
  • 36
  • 418 posts
  • Report post
Posted June 9, 2018

I think the latest version should still be compatible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 2
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Draco18s
      [1.13.2] Where do I find the csv files?

      By Draco18s · Posted just now

      It probably hasn't been discovered yet and may still only have a SRG name.
    • Zorm
      Game crashing (crash report) (Botania?)

      By Zorm · Posted 28 minutes ago

      So here is the correpsonding logs file https://pastebin.com/UE0Yv2UE   Now that's a thing I told my friends would be a problem, that some mod files only have "-1.12.2" in their name and we couldn't figure out the version of the mods, but it's just the name that changes, we all have the same versions. All of these mods were downloaded on 9minecraft.net I think    
    • Drachenbauer
      how can i add a custom player-model to my mod?

      By Drachenbauer · Posted 30 minutes ago

      Hallo   as i watched the youtube-channel of "ExplodingTNT", i saw the players "Pink Sheep" and "Purple Shep", who managed to turn into sheeps with wired moustaches in Minecraft.   So i wonder, how can i add an additional custom player-model into my mod? I want to switch between the common player-model and one of my Angry Birds-models by hitting a key on my keyboard.   It should be still pussible to wear all pieces of armour, but chestplate, leggings and boots should be invisible, if worn.   I made a specific model for this with Blockbench: For holding items, i added two invisible cubes (in separate folders) to the sides of the bird, because i want to recreate the effect from the Angry Birds toons, where the characters have things, they use, hovering near their sides (i like to call that telecinetic powers).   And is it possible to enter other player´s server-worlds with this special appearence, that other players can see it too?
    • SorenCabral
      Custom PlayerRender/ModelBiped/ArmorLayers - 1.12.2

      By SorenCabral · Posted 34 minutes ago

      I found this example in web, would be like this with me too? public class RenderCustomPlayerEvent { RenderHoverClaws render = new RenderHoverClaws(Minecraft.getMinecraft().getRenderManager(), new ModelHoverClaws(), 1F); @Subscribe public void renderCustomPlayer(RenderPlayerEvent.Pre pre) { pre.setCanceled(true); render.doRender((EntityLiving) pre.getEntityLiving(), 0D, -1.625, 0D, 0F, 0.0625F); } }  
    • DaemonUmbra
      Game crashing (crash report) (Botania?)

      By DaemonUmbra · Posted 43 minutes ago

      Please take a look at my forum signature and make sure your friends get this information as well. Your file names suggest many of these mods have come from sketchy sources.
  • Topics

    • Daring Do
      3
      [1.13.2] Where do I find the csv files?

      By Daring Do
      Started 1 hour ago

    • Zorm
      5
      Game crashing (crash report) (Botania?)

      By Zorm
      Started 57 minutes ago

    • Drachenbauer
      0
      how can i add a custom player-model to my mod?

      By Drachenbauer
      Started 30 minutes ago

    • SorenCabral
      23
      Custom PlayerRender/ModelBiped/ArmorLayers - 1.12.2

      By SorenCabral
      Started Yesterday at 03:28 AM

    • HeyItsTechy
      122
      》League of Prison《 [SEASON 4 | RESET] ⍟ 150+ Quests ⍟ McMMO ⍟ RPG ⍟ Crates ⍟ Dungeons ⍟

      By HeyItsTechy
      Started July 28, 2018

  • Who's Online (See full list)

    • Talli4002
    • Draco18s
    • Terrails
    • Konlii
    • lehjr
    • SorenCabral
    • JavaMan7
    • Daring Do
    • Catwolf
    • Zorm
    • tylastrog
    • Setrion
    • TheRPGAdventurer
    • poopfejk
    • Flemmli97
    • Meldexun
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Dependency Crash?
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community