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

Hi! After following LexManos's (LexManos' ?) tutorial on setting up the workspace with multiple mods, (which I have successfully done, thank you Lex!) I am wondering how to add it so that all my mods except 1 of them is dependent on that one. This is meant to be so that I can modify my core mod and then its code is directly usable from each of my other mods. Here is what the setup looks like, and two sample build.gradle files. Hope someone can help me out on this! (Note, all the errors are because the sub mods cannot find the core mod)

 

Setup image:

BuildSetup.png

 

Core build.gradle:

 

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.1-SNAPSHOT'
    }
}

apply plugin: 'forge'

version = "1.7.2-2.0.0"
group= "com.countrygamer.core" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Core"

minecraft {
    version = "1.7.2-10.12.0.1034"
    assetDir = "eclipse/assets"
    if (file('../run').exists()) {
        assetDir = "../run/assets"
    } else {
        assetDir = "assets"
    }
}
processResources
{
    // 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'
    }
}

 

 

SubMod build.gradle:

 

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.1-SNAPSHOT'
    }
}

apply plugin: 'forge'

version = "1.7.2-2.0.0"
group= "com.countrygamer.weepingangels" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Angel"

minecraft {
    version = "1.7.2-10.12.0.1034"
    assetDir = "eclipse/assets"
    if (file('../run').exists()) {
        assetDir = "../run/assets"
    } else {
        assetDir = "assets"
    }
}
processResources
{
    // 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'
    }
}

 

  • Author

The folder layout is like so:

/Workspace/

/Workspace/Core/src/main/java/

/Workspace/Angel/src/main/java/

/Workspace/CAPO/src/main/java/

/Workspace/PvZ/src/main/java/

 

I added a file named "settings.gradle" to /Workspace/Core/ with text:

includeFlat ‘Angel’,’CAPO’, ‘PvZ’

 

I then ran the "bash gradlew setupDevWorkspace --refresh-dependencies" and "bash eclipse --refresh-dependencies" on each mod directory (Core, Angel, CAPO, PvZ).

 

Opened the workspace in eclipse (path /Workspace/) and it still does not work.

 

EDIT: I have also tried putting a "settings.gradle" into the Angel CAPO and PvZ directories, including the Core project. This injects the data, but does not allow for a successful workspace run nor build

After putting one settings.gradle in your "core", edit your run configurations to load that "core" mod.

All other mods should load as dependent.

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.