Jump to content

Recommended Posts

Posted (edited)

Good evening,

 

I'm searching now for hours after a solution.

 

I'm coding a mod with a friend.

We have now the mod to a point, where we want to  compile it, but the compiler prints following text.

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
#################################################
         ForgeGradle 2.3-SNAPSHOT-7764e3e
  https://github.com/MinecraftForge/ForgeGradle
#################################################
                 Powered by MCP
             http://modcoderpack.com
     by: Searge, ProfMobius, R4wk, ZeuX
     Fesh0r, IngisKahn, bspkrs, LexManos
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava UP-TO-DATE
:compileJava
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\container\ContainerCondenser.java:41: error: cannot find symbol
                this.tileentity.setField(id, data);
                               ^
  symbol:   method setField(int,int)
  location: variable tileentity of type TileInventory
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:100: error: cannot find symbol
                if(this.getStackInSlot(0).isEmpty()) return false;
                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:102: error: cannot find symbol
                Dryable result = NTMRegistryManager.CONDENSER_REGISTRY.getItem(getStackInSlot(0));
                                                                               ^
  symbol:   method getStackInSlot(int)
  location: class TileCondenser
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:153: error: cannot find symbol
                ItemStack material = this.getStackInSlot(0);
                                         ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:165: error: cannot find symbol
                ItemStack input  = this.getStackInSlot(2);
                                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:166: error: cannot find symbol
        ItemStack output = this.getStackInSlot(1);
                               ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:182: error: cannot find symbol
                        this.setInventorySlotContents(1, input_handler.getContainer());
                            ^
  symbol: method setInventorySlotContents(int,ItemStack)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:183: error: cannot find symbol
                        this.decrStackSize(2, 1);
                            ^
  symbol: method decrStackSize(int,int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:186: error: cannot find symbol
                if(getStackInSlot(2).getItem() == Items.GLASS_BOTTLE && (ItemStack.areItemsEqual(output, TankUtil.WATER_BOTTLE) || this.getStackInSlot(1).isEmpty()))
                   ^
  symbol:   method getStackInSlot(int)
  location: class TileCondenser
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:186: error: cannot find symbol
                if(getStackInSlot(2).getItem() == Items.GLASS_BOTTLE && (ItemStack.areItemsEqual(output, TankUtil.WATER_BOTTLE) || this.getStackInSlot(1).isEmpty()))
                                                                                                                                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:192: error: cannot find symbol
                                this.setInventorySlotContents(1, TankUtil.WATER_BOTTLE.copy());
                                    ^
  symbol: method setInventorySlotContents(int,ItemStack)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:193: error: cannot find symbol
                                this.decrStackSize(2, 1);
                                    ^
  symbol: method decrStackSize(int,int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:245: error: cannot find symbol
                if(this.getStackInSlot(index).getCount() == this.getStackInSlot(index).getMaxStackSize()) return false;
                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileCondenser.java:245: error: cannot find symbol
                if(this.getStackInSlot(index).getCount() == this.getStackInSlot(index).getMaxStackSize()) return false;
                                                                ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\container\ContainerFreezer.java:41: error: cannot find symbol
                this.tileentity.setField(id, data);
                               ^
  symbol:   method setField(int,int)
  location: variable tileentity of type TileInventory
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:99: error: cannot find symbol
        if(this.getStackInSlot(0).getCount() == ice.getMaxStackSize()) return false;
               ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:107: error: cannot find symbol
        if(this.getStackInSlot(0).isEmpty())
               ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:108: error: cannot find symbol
            this.setInventorySlotContents(0, new ItemStack(ice.getItem()));
                ^
  symbol: method setInventorySlotContents(int,ItemStack)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:110: error: cannot find symbol
        else if(this.getStackInSlot(0).getCount() >= 1)
                    ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:111: error: cannot find symbol
                this.getStackInSlot(0).grow(1);
                    ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:118: error: cannot find symbol
                ItemStack input  = this.getStackInSlot(2);
                                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:119: error: cannot find symbol
                ItemStack output = this.getStackInSlot(1);
                                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:138: error: cannot find symbol
                                this.setInventorySlotContents(1, new ItemStack(handler.getContainer().getItem()));
                                    ^
  symbol: method setInventorySlotContents(int,ItemStack)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:139: error: cannot find symbol
                                this.getStackInSlot(2).shrink(1);
                                    ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:140: error: cannot find symbol
                                System.out.println(getStackInSlot(2));
                                                   ^
  symbol:   method getStackInSlot(int)
  location: class TileFreezer
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:144: error: cannot find symbol
                                this.getStackInSlot(1).grow(1);
                                    ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:145: error: cannot find symbol
                                this.decrStackSize(2, 1);
                                    ^
  symbol: method decrStackSize(int,int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:149: error: cannot find symbol
                if(ItemStack.areItemStacksEqual(this.getStackInSlot(2), TankUtil.WATER_BOTTLE))
                                                    ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:156: error: cannot find symbol
                                setInventorySlotContents(1, new ItemStack(Items.GLASS_BOTTLE));
                                ^
  symbol:   method setInventorySlotContents(int,ItemStack)
  location: class TileFreezer
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:159: error: cannot find symbol
                                this.getStackInSlot(1).grow(1);
                                    ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:161: error: cannot find symbol
                                this.decrStackSize(2, 1);
                                    ^
  symbol: method decrStackSize(int,int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:170: error: cannot find symbol
                if(this.getStackInSlot(index).getCount() == this.getStackInSlot(index).getMaxStackSize()) return false;
                       ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileFreezer.java:170: error: cannot find symbol
                if(this.getStackInSlot(index).getCount() == this.getStackInSlot(index).getMaxStackSize()) return false;
                                                                ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:108: error: cannot find symbol
        if(((ItemStack)this.getStackInSlot(0)).isEmpty()) return false;
                           ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:109: error: cannot find symbol
        ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.getStackInSlot(0));
                                                                              ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:111: error: cannot find symbol
        ItemStack itemstack1 = this.getStackInSlot(1);
                                   ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:114: error: cannot find symbol
        if(itemstack1.getCount() + itemstack.getCount() <= this.getInventoryStackLimit()
                                                               ^
  symbol: method getInventoryStackLimit()
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:170: error: cannot find symbol
        ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.getStackInSlot(0));
                                                                              ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:172: error: cannot find symbol
        if (this.getStackInSlot(1).isEmpty())
                ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:174: error: cannot find symbol
            this.setInventorySlotContents(1, itemstack.copy());
                ^
  symbol: method setInventorySlotContents(int,ItemStack)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:176: error: cannot find symbol
        else if (this.getStackInSlot(1).getItem() == itemstack.getItem())
                     ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:178: error: cannot find symbol
            getStackInSlot(1).grow(itemstack.getCount());
            ^
  symbol:   method getStackInSlot(int)
  location: class TileNetherrackFurnace
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:181: error: cannot find symbol
        this.getStackInSlot(0).shrink(1);
            ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:183: error: cannot find symbol
        if (this.getStackInSlot(0).getCount() <= 0)
                ^
  symbol: method getStackInSlot(int)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:185: error: cannot find symbol
            this.setInventorySlotContents(0, ItemStack.EMPTY);
                ^
  symbol: method setInventorySlotContents(int,ItemStack)
C:\Users\Gaprosys\Documents\NTM2\build\sources\main\java\mod\nethertweaks\blocks\tile\TileNetherrackFurnace.java:195: error: cannot find symbol
                        slot = this.getStackInSlot(1);
                                   ^
  symbol: method getStackInSlot(int)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
46 errors
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

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

BUILD FAILED

Total time: 20.66 secs

I have all the mods we are using for dependencies in the libs folder.

The gradle.build looks like following:

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.

repositories {
    flatDir {
        dirs 'libs'
    }
}

version = "2.0.0"
group = "mod.nethertweaks" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "nethertweaksmod"

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

minecraft {
    version = "1.12.2-14.23.5.2768"
    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.
}

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 'mod.sfhcore:sfhcore-2.0.0'
    compile files('sfhcore-2.0.0.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'
    }
}

 

I've even tried setting up a new environment, but with no luck.

 

The methods, where the errors pointing, are in a class definined in a mod called SFH-Core.

SFH-Core should be a core-mod.

 

I've Googled now for several hours(I think I am now by 13 hours, but I didn't find any solution to our problem.

 

Hopefully someone can help us.

 

Sincelery yours

 

 - Gaprosys

 

Edited by Gaprosys1
Typo and Grammar
Posted

What do you mean by core-mod... do you mean a dependency or do you mean a mod that directly modifies Minecraft code?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Do not refer to dependencies as core-mods, the term coremod has a special meaning when it comes to Forge.

I believe since you're using 1.12.2 you shouldn't need to do anything beyond putting your dependency jar in the libs folder and re-running setupDecompWorkspace

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Sorry for the long wait.

 

Thanks for making it clear what a core mod is in Forge.

 

In the mean time I found a solution to my problem. The problem wasn't by NTM, it was by SFH.

 

I had to add

task deobfJar(type: Jar) { // Generate deobfuscated
    from sourceSets.main.output
    classifier = 'deobf'
}

tasks.build.dependsOn('deobfJar')

artifacts {
    archives deobfJar
    archives jar
}

to my build.gradle by SFH(the mod thats required for NTM to compile).

 

After I added this lines to my build.gradle, I recompiled SFH and put the modid-1.0.0-deobf.jar into the libs folder from NTM.

 

That was all I had to do. now it compiles and runs without errors

 

But thanks for your replies DaemonUmbra

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.

Announcements



×
×
  • Create New...

Important Information

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