Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Jack Richard

Jack Richard

Members
 View Profile  See their activity
  • Content Count

    28
  • Joined

    September 10, 2020
  • Last visited

    November 20, 2020

Community Reputation

0 Neutral

About Jack Richard

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    But now that I've entered the game, I've noticed a fatal flaw. None of my block or items registered. I think it's because of ignoring the Minecraft dependencies, so I'll need to keep on working.
    • September 28, 2020
    • 19 replies
  2. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I changed my shadowJar config to this: shadowJar { relocate('com.google', 'org.(modid).google') configurations = [project.configurations.shadow] classifier '' relocate('org.apache', 'org.(modid).apache') } And I have success!
    • September 28, 2020
    • 19 replies
  3. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I used this to get the libraries back: shadow group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2' shadow group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2' But now I'm getting this: java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter;
    • September 28, 2020
    • 19 replies
  4. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    Now we're getting somewhere... here's my build.gradle: configurations { provided compile.extendsFrom provided } dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.36' shadow group: 'org.seleniumhq.selenium', name:'selenium-java', version:'3.141.59' } shadowJar { configurations = [project.configurations.shadow] classifier '' relocate('org.apache', 'org.(modid).apache') } processResources { inputs.property "version", project.version inputs.property "mcversion", "1.15.2-31.2.36" from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' expand 'version':project.version, 'mcversion': "1.15.2-31.2.36" } from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } project.tasks.build.dependsOn shadowJar The file size drastically shrinks, and Minecraft recognizes it as a mod! But now, I'm getting: java.lang.NoClassDefFoundError: org/(modid)/apache/logging/log4j/LogManager So there might be more work to do...
    • September 28, 2020
    • 19 replies
  5. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I've relocated the Apache libraries now, but it's still not recognizing. When I recompile the jar, it appears that it has additionally copied all of Minecraft Forge's files. I think Shadow is picking up the: minecraft 'net.minecraftforge:forge:1.15.2-31.2.36' in dependencies{}... I can't get exclude to work on this dependency, and I think this may be the solution.
    • September 28, 2020
    • 19 replies
  6. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    It runs fine with runClient, but when it's built, it's not recognized at all.
    • September 28, 2020
    • 19 replies
  7. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    All my libraries are inside the jar now, but Minecraft does not recognize it as a mod anymore...
    • September 28, 2020
    • 19 replies
  8. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    At this point, I've reimplemented the Shadow plugin, but it makes no changes to the jar unless I use: project.tasks.build.dependsOn shadowJar which makes a much larger jar, and I assume my dependencies are somewhere in there, but Minecraft does not recognize it as a mod. When I used the dependencies{} block in the shadowJar{} block, and included my dependencies, it would generate a 1 KB jar, which is definitely not right at all. Other than including the plugin, here's the code that Shadow effects: dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.36' compile group: 'org.seleniumhq.selenium', name:'selenium-java', version:'3.141.59' } shadowJar { relocate 'org.apache.commons.exec', 'org.(modid).apache.commons.exec' classifier '' } Thanks all for your help.
    • September 28, 2020
    • 19 replies
  9. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I'm guessing I still need to move the Apache library somehow, because I always get NoClassDefFoundError when calling it... If you still aren't allowed to use Apache libraries (I read old forum posts saying you can't include those normally), I guess that would explain the error. I couldn't figure out the Shadow plugin, it didn't seem to include any dependencies, so I used that guide, I'll try again with Shadow. Thanks.
    • September 28, 2020
    • 19 replies
  10. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I'm trying to use this guide now. Forge doesn't seem to have srgExtra or extraLines anymore, is there an alternative?
    • September 27, 2020
    • 19 replies
  11. Jack Richard

    Custom Item Problem (FORGE 1.15.2)

    Jack Richard replied to nat0875's topic in Modder Support

    Is it just crossed out, or not allowing the game to run? If you're using IntelliJ or Eclipse, you'll see a line through a class or method name if it's deprecated. It shouldn't crash the game because of that.
    • September 27, 2020
    • 3 replies
  12. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I changed it to use the plugins{} block instead. shade wasn't a valid option, so I stuck with shadow. But I see some examples just using compile, does that work anyway? Okay, here's my shadowJar{} block I added: shadowJar { relocate 'org.apache', 'org.(modid).apache' } I'm still getting NoClassDefFoundError, though. Thanks for your help so far.
    • September 27, 2020
    • 19 replies
  13. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard replied to Jack Richard's topic in Modder Support

    I looked into shadowing, and I added the plugin to my Gradle file. Before, I was "shading" using this: configurations.shade.each { dep -> from(project.zipTree(dep)){ exclude 'META-INF', 'META-INF/**' } } ...but I'm guessing that isn't the same thing. I needed to use version 4.0.4, because 6.0 didn't support the version of Gradle I'm using. When I build the jar, the logs show a NoClassDefFoundError for the main package of the dependency. All I've added to build.gradle is: buildscript { repositories { maven { url = 'https://files.minecraftforge.net/maven' } maven { url = "https://plugins.gradle.org/m2/" } jcenter() mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true classpath "com.github.jengelman.gradle.plugins:shadow:4.0.4" } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' apply plugin: "com.github.johnrengelman.shadow" dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.36' shadow 'nameofdependency' } Maybe there is more configuration needed?
    • September 27, 2020
    • 19 replies
  14. Jack Richard started following Adding org.apache Libraries To Mod September 27, 2020
  15. Jack Richard

    Adding org.apache Libraries To Mod

    Jack Richard posted a topic in Modder Support

    I'm using version 1.15.2, and I'm trying to include Apache Commons Exec in my mod. From what I've read, you can't use it like a normal dependency. But, the Apache library is a prerequisite for the dependency I am adding, so I don't think I can simply relocate it. How can I use this? Thanks in advance.
    • September 27, 2020
    • 19 replies
  16. Jack Richard

    [1.15.2] Tile Entity Re-Creating on GUI Open

    Jack Richard replied to Jack Richard's topic in Modder Support

    Got it, and got it. Thanks for explaining it to me, I'll try to wrap my head around that, and send an update soon. Thank you!
    • September 25, 2020
    • 15 replies
  • All Activity
  • Home
  • Jack Richard
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community