Jump to content

[1.7.2] Oddity after compile


delpi

Recommended Posts

I've been rocking and rolling with 1.7.2 for some time now, but I just ran into a weird issue.

 

Without changing anything that I know of, one of my child references compiles fine but when I try to run it on my server, the server crashes.

 

When i simply try to set the value in the constructor of the child class, it tells me the method does not exist.  Everything runs fine in the IDE. 

 

This is a portion of the parent class

 

 

 

protected int absorb = 0;

 

    public CDItem() {

        super();

       

    }

 

 

 

 

The one unusual thing on the setup is that the parent is in a 'repository' for my mod.  It is sucked in through gradle on compile.

 

 

 

dependencies {

        compile files (

                "../CD_Utilities/java"

        )

}

 

 

 

 

There is a couple lines about unsafe operation i don't remember seeing in the gradle output.

 

 

****************************

Powered By MCP:           

http://mcp.ocean-labs.de/ 

Searge, ProfMobius, Fesh0r,

R4wk, ZeuX, IngisKahn     

MCP Data version : unknown

****************************

:extractUserDev UP-TO-DATE

:extractNatives UP-TO-DATE

:makeStart SKIPPED

:compileApiJava UP-TO-DATE

:processApiResources UP-TO-DATE

:apiClasses UP-TO-DATE

:sourceMainJava UP-TO-DATE

:compileJavaNote: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

 

:processResources UP-TO-DATE

:classes

:jar

:compileTestJava UP-TO-DATE

:processTestResources UP-TO-DATE

:testClasses UP-TO-DATE

:test UP-TO-DATE

:genSrgs SKIPPED

:reobf

:assemble

:check UP-TO-DATE

:build

 

BUILD SUCCESSFUL

 

Total time: 15.526 secs

 

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

Here is the gradle build file

 

 

 

buildscript {

repositories

{

mavenCentral()

maven {

name = "forge"

url = "http://files.minecraftforge.net/maven"

}

maven {

name = "sonatype"

url = "https://oss.sonatype.org/content/repositories/snapshots/"

}

}

dependencies

{

classpath "net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT"

}

}

 

apply plugin: "forge"

 

sourceCompatibility = 1.7

targetCompatibility = 1.7

 

sourceSets

{

main

{

java { srcDirs = ["$projectDir/java"] }

resources { srcDirs = ["$projectDir/resources"] }

}

}

 

archivesBaseName = "Dimension Multiplyer"

version = "2.24"

minecraft.version = "1.7.2-10.12.1.1060"

 

dependencies {

        compile files (

                "../CD_Utilities/java"

        )

}

 

 

 

To give some more specifis, I had something in the CD_Utilities called CD_Items which extended Items. It also had some variables and methods.  If I was extending by only one of my other mods, things were fine.  As soon as I extended it into a 2nd mod, one or the other would claim the method/variable didn't exists.  It was dependent on load order.  If I chaned it around, everything was fine.

 

To solve it I moved that class out of the repository into each individual mod, but now I end up having to modify both which is agsints the whole point in having it in a central location in the first point.

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.