diff --git a/build.gradle b/build.gradle index e89fc4488c..859bbdb28c 100644 --- a/build.gradle +++ b/build.gradle @@ -237,7 +237,7 @@ project(':forge') { environment 'assetIndex', '{asset_index}' environment 'assetDirectory', '{assets_root}' environment 'nativesDirectory', '{natives}' - environment 'MC_VERSION', '${MC_VERSION}' + environment 'MC_VERSION', MC_VERSION environment 'MCP_MAPPINGS', '{mcp_mappings}' environment 'MCP_TO_SRG', '{mcp_to_srg}' environment 'FORGE_GROUP', "${project.group}" @@ -250,7 +250,7 @@ project(':forge') { environment 'tweakClass', 'net.minecraftforge.fml.common.launcher.FMLServerTweaker' environment 'mainClass', 'net.minecraft.launchwrapper.Launch' - environment 'MC_VERSION', '${MC_VERSION}' + environment 'MC_VERSION', MC_VERSION environment 'MCP_MAPPINGS', '{mcp_mappings}' environment 'MCP_TO_SRG', '{mcp_to_srg}' environment 'FORGE_GROUP', "${project.group}" @@ -749,7 +749,7 @@ project(':forge') { environment 'assetIndex', '{asset_index}' environment 'assetDirectory', '{assets_root}' environment 'nativesDirectory', '{natives}' - environment 'MC_VERSION', '${MC_VERSION}' + environment 'MC_VERSION', MC_VERSION environment 'MCP_MAPPINGS', '{mcp_mappings}' environment 'MCP_TO_SRG', '{mcp_to_srg}' environment 'FORGE_GROUP', "${project.group}" @@ -761,7 +761,7 @@ project(':forge') { environment 'tweakClass', 'net.minecraftforge.fml.common.launcher.FMLServerTweaker' environment 'mainClass', 'net.minecraft.launchwrapper.Launch' - environment 'MC_VERSION', '${MC_VERSION}' + environment 'MC_VERSION', MC_VERSION environment 'MCP_MAPPINGS', '{mcp_mappings}' environment 'MCP_TO_SRG', '{mcp_to_srg}' environment 'FORGE_GROUP', "${project.group}" diff --git a/mdk/build.gradle b/mdk/build.gradle index 75cb49c947..668998cda9 100644 --- a/mdk/build.gradle +++ b/mdk/build.gradle @@ -114,3 +114,13 @@ publishing { } } } + +// FML does not support loading exploded directories as mods. +// Eclipse works fine because it merges classes and resources when debugging +// IntelliJ used to work because FG2 forced the files to be jared during debugging. +// Since FG3+ doesn't do that, we need to merge the sourcesets from gradle's side. +sourceSets.each { + def dir = layout.buildDirectory.file("sourcesSets/$it.name").get().asFile + it.output.resourcesDir = dir + it.java.outputDir = dir +} \ No newline at end of file