Gradle problem about forgemod debug


#1


How do i modify this line

my mod project is outside of the project.

in the another way.
image


#2

please read https://docs.spongepowered.org/stable/en/plugin/debugging.html
you do not need to touch any spongeforge gradle files


#3

I’m pretty sure i need modify this file. because i will raplace the testmods with another mod that modding by my self.


#4

I code plugin and mod together


#5

then you need to setup a forge workspace and add spongeapi as a dependency for your mod
https://mcforge.readthedocs.io/en/latest/gettingstarted/#from-zero-to-modding

you also need to throw the dev shaded spongeforge jar in the run/mods folder
your build.gradle should look something like this

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

plugins {
    id 'java'
}

apply plugin: 'net.minecraftforge.gradle.forge'
group = <group>
version = <project_version>
archivesBaseName = <project_name>

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    mavenCentral()
    maven {
        name = 'sponge'
        url = 'http://repo.spongepowered.org/maven'
    }
}

minecraft {
    version = "forgeversionhere"
    runDir = "run"
    mappings = "stable_39"
}

dependencies {
    compile 'org.spongepowered:spongeapi:7.0.0'
}

#6

That’s what I did, It’s work normally of my mod ,I just want to know how to debug with spongeforge in the intellij.


#7

what part of this isn’t working?


#8

If i run/debug spongeForge in interllij ,it’s doesn’twork.
if i build jar into production environment ,it’s work well.


#9

again, what exactly isn’t working, any logs? anything?
you are supposed to run forge in intellij and add spongeforge to its modfolder…


#10

if i don’t modify build.gradle of spongeforge, NoSuchMethodException:item.setUnlocalizedname()
was occurred.My grandma was ill, i am in hospital,forgive me can’t catch screenshot for you.