Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I am trying to update one of my mods to 1.8.9, and part of the update includes an API that wasn't present in previous builds, but it keeps failing with a package not found error.

 

Error log:

This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
#################################################
         ForgeGradle 2.1-SNAPSHOT-75bb646
  https://github.com/MinecraftForge/ForgeGradle
#################################################
               Powered by MCP unknown
             http://modcoderpack.com
         by: Searge, ProfMobius, Fesh0r,
         R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava
C:\Minecraft Dev\CashCraft\build\sources\api\java\io\github\tehstoneman\cashcraft\api\IEcomomy.java:3: error: package io.github.tehstoneman.cashcraft.economy does not exist
import io.github.tehstoneman.cashcraft.economy.PlayerWallet;
                                              ^
C:\Minecraft Dev\CashCraft\build\sources\api\java\io\github\tehstoneman\cashcraft\api\IEcomomy.java:31: error: cannot find symbol
        public PlayerWallet getWallet( EntityPlayer player );
               ^
  symbol:   class PlayerWallet
  location: interface IEcomomy
2 errors
:compileApiJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileApiJava'.
> 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: 8.709 secs

 

It seems that for some reason, during the build process, it copies the API source files into the build folder, but not the rest of the source.

 

build.gradle:

buildscript
{
    repositories
    {
        jcenter()
        maven
        {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
		//url "https://plugins.gradle.org/m2"
        }
    }
    dependencies
    {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
    }
}

apply plugin: "net.minecraftforge.gradle.forge"

archivesBaseName = "CashCraft"
group = "io.github.tehstoneman.cashcraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
version = "mc1.8.9-2.0.0"

// java version
sourceCompatibility = 1.7
targetCompatibility = 1.7

minecraft
{
    version = "1.8.9-11.15.1.1722"
if( file('../run').exists() )
{
	runDir = "../run/assets"
}
else
{
	runDir = "assets"
}

mappings = "stable_20"
}

sourceSets
{
    main
    {
        //java { srcDirs = ["src/main/java","src/api/java"] }
        java
        {
        	srcDir "src/main/java"
        }
        resources
        {
        	srcDir "src/main/resources"
        }
    }
    api
    {
        java
        {
        	srcDir "src/api/java"
        }
    }
}

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, thats not the mcmod.info
    from(sourceSets.main.resources.srcDirs)
    {
        exclude 'mcmod.info'
        exclude '*.xcf'
        exclude '*.wav'
    }
}

 

Can anybody help?

Run with --stacktrace option to get the stack trace.

And if I ever helped anyone with anything, let me know

I am a noob in forge

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.