Jump to content
  • Home
  • Files
  • Docs
  • Merch
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
  • ForgeGradle
  • [SOLVED] Can't export mod with dependency?
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
r0m3x

[SOLVED] Can't export mod with dependency?

By r0m3x, December 24, 2018 in ForgeGradle

  • Reply to this topic
  • Start new topic

Recommended Posts

r0m3x    0

r0m3x

r0m3x    0

  • Tree Puncher
  • r0m3x
  • Members
  • 0
  • 9 posts
Posted December 24, 2018 (edited)

Sooo I recently started working on a Pixelmon addon for Pixelmon Reforged and it was running great inside of IntelliJ until I went to go export...

I'm using IntelliJ IDEA 2018.2.1

 

There are no errors in the code and I have the Pixelmon jar inside of my Project Structure scoped "Compile".

I also have the Pixelmon jar inside of run/libs/

 

I get this:

error: package com.pixelmonmod.pixelmon.entities.pixelmon does not exist
import com.pixelmonmod.pixelmon.entities.pixelmon.EntityPixelmon;
                                                 ^
1 error
:compileJava FAILED

 

Here is my build.gradle

Spoiler

buildscript {
    repositories {
        jcenter()
        maven { url = "http://files.minecraftforge.net/maven" }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}
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 = "1.0"
group = "me.r0m3x.pokehelp" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "pokehelp"

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

minecraft {
    version = "1.12-14.21.1.2387"
    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_20170624"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

//repositories {
//    flatDir {
//        dirs "libs"
//    }
//}

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"

    compile files('libs/Pixelmon-1.12.2-6.3.4-universal.jar')
      
    // 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

}

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 December 24, 2018 by r0m3x
  • Quote

Share this post


Link to post
Share on other sites

DaemonUmbra    354

DaemonUmbra

DaemonUmbra    354

  • Reality Controller
  • DaemonUmbra
  • Forum Team
  • 354
  • 6340 posts
Posted December 24, 2018

How are you exporting your mod?

  • Quote

Share this post


Link to post
Share on other sites

r0m3x    0

r0m3x

r0m3x    0

  • Tree Puncher
  • r0m3x
  • Members
  • 0
  • 9 posts
Posted December 24, 2018
23 minutes ago, DaemonUmbra said:

How are you exporting your mod?

 

I'm assuming you meant this?

 

gradlew build

 

  • Quote

Share this post


Link to post
Share on other sites

DaemonUmbra    354

DaemonUmbra

DaemonUmbra    354

  • Reality Controller
  • DaemonUmbra
  • Forum Team
  • 354
  • 6340 posts
Posted December 24, 2018

Yes

Please post your mod as a Github repo

  • Quote

Share this post


Link to post
Share on other sites

r0m3x    0

r0m3x

r0m3x    0

  • Tree Puncher
  • r0m3x
  • Members
  • 0
  • 9 posts
Posted December 24, 2018 (edited)

I have only one class though :/

Edited December 24, 2018 by r0m3x
  • Quote

Share this post


Link to post
Share on other sites

DaemonUmbra    354

DaemonUmbra

DaemonUmbra    354

  • Reality Controller
  • DaemonUmbra
  • Forum Team
  • 354
  • 6340 posts
Posted December 24, 2018

Wait I only just caught this detail, you have the jar in ./run/libs? Move it to ./libs and remove that line from your build.gradle

  • Quote

Share this post


Link to post
Share on other sites

r0m3x    0

r0m3x

r0m3x    0

  • Tree Puncher
  • r0m3x
  • Members
  • 0
  • 9 posts
Posted December 24, 2018
57 minutes ago, DaemonUmbra said:

Wait I only just caught this detail, you have the jar in ./run/libs? Move it to ./libs and remove that line from your build.gradle

 

That worked! Thanks!

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      [1.14.4] [Solved] Trouble With Packets

      By diesieben07 · Posted 40 minutes ago

      If you do this, then there is no point having the capability. Just store it in the stack's NBT tag directly at that point...
    • Cerandior
      [1.14.4] [Solved] Trouble With Packets

      By Cerandior · Posted 47 minutes ago

      Yeah, I registered the entity and everything is fine now.
    • Cerandior
      [1.14.4] [Solved] Trouble With Packets

      By Cerandior · Posted 1 hour ago

      I have no idea man. I tried setting the breakpoints at different parts of the class because intelliJ displays a tree of all the methods called at that point and I never found any of the shareTags methods where I expected them to be. And I know, what I did doesn't really make too much sense because the stack should call the readShareTag and getShareTag automatically (I did look into a lot of methods related to itemstacks), but for some reason nothing was working as expected for me. I just tried that and everything works fine now, if I get rid of that line of code nothing works again.   As for the entity, that is probably caused by the "unique" type of zombie that my staff spawns. I forgot to register that in my registry events. I am surprised the entity was spawning considering I haven't registered them actually. I will register them right now, and check if the error will persist. Thank you for your help.
    • diesieben07
      on/off button for custom furnace

      By diesieben07 · Posted 1 hour ago

      Any GUI that has a button on it. MainMenuScreen for example.
    • plugsmustard
      on/off button for custom furnace

      By plugsmustard · Posted 1 hour ago

      alright. where in vanilla are there those examples you mentioned?
  • Topics

    • Cerandior
      10
      [1.14.4] [Solved] Trouble With Packets

      By Cerandior
      Started 23 hours ago

    • plugsmustard
      18
      on/off button for custom furnace

      By plugsmustard
      Started 23 hours ago

    • AkosM
      3
      Increase target's damage via usable item

      By AkosM
      Started 17 hours ago

    • leesj
      3
      How to Give potion effect to entity

      By leesj
      Started 23 hours ago

    • thedarkcolour
      10
      [1.14] Patching method with coremod in TreeFeature causes IncompatibleClassChangeError

      By thedarkcolour
      Started 8 hours ago

  • Who's Online (See full list)

    • Eonasdan
    • Cerandior
    • Maraea21
    • diesieben07
    • Zimphire
    • Draco18s
    • loordgek
    • imacatlolol
    • jgfarrell
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • ForgeGradle
  • [SOLVED] Can't export mod with dependency?
  • Theme
  • Contact Us
  • Discord

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