New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Forge while building with intellij on 1.18
& 1.18-mixin
branch fails 1.18.1/1.18.2 due to missing Common
module resources & classes
#12
Comments
Can you reproduce on a default forge MDK? |
@jaredlll08 No, i cannot reproduce: https://www.youtube.com/watch?v=PlzwcKwnPqQ |
|
|
1.18-mixin
branch fails 1.18.1/1.18.21.18
& 1.18-mixin
branch fails 1.18.1/1.18.2
1.18
& 1.18-mixin
branch fails 1.18.1/1.18.21.18
& 1.18-mixin
branch fails 1.18.1/1.18.2 due to missing Common
module resources & classes
This is an issue with ForgeGradle. FG assumes that all sources listed will be under the What you could do if you absolutely need to run it under idea (I assume for hotswapping code), is manually change your run config to read like so:
(although on a single line with |
What you can actually do, is change your run config to look like this: client {
workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Client'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
def output = sourceSets.main.output;
def commonOutput = project(":Common").sourceSets.main.output;
environment("MOD_CLASSES", [output.classesDirs.asPath, output.resourcesDir.path, commonOutput.classesDirs.asPath, commonOutput.resourcesDir.path].join(";"))
mods {
modClientRun {
source sourceSets.main
source project(":Common").sourceSets.main
}
}
} Which appears to be working fine with loading and hotswapping, although be warned, this does set your
which are the paths used when running under gradle, not the paths used when running under IDEA, I don't know the implications it may have though. |
Doing these instructions: #12 (comment) works for both forge loading + hotswapping!!! Thank you so much :D |
I'd also say that you should probably add #12 (comment) to this git repo's forge build.gradle when you get the chance. |
After talking with someone and doing a few more tests, this shouldn't actually work, the format isn't 1:1 with what Forge expects (may not be applicable for new Forge versions) and it is using the gradle build folders, not the IntelliJ ones. Also in doing more testing, while it seems to work fully for normal idea, trying to use the Im also unsure how it would work for dcevm, if that even works on Forge, the Jetbrains jdk was giving issues a while ago. I think we could hardcode a path to the idea output for common though, but when I tested that in the few minutes I had, it wasn't working, so I'm going to re-open this until a concrete fix is found. |
This should have been fixed by MinecraftForge/ForgeGradle#851 (comment) |
This issue also occurs on 1.18.2.
Here's a video of what happens: https://youtu.be/g-ZUYu0mIWw
Video starts w/ building w/ gradle, then I switch to Intellij building.
Fabric building w/ intellij works just fine
The text was updated successfully, but these errors were encountered: