Skip to content

Commit

Permalink
fix: allow neoforge declaration without modid
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Jul 23, 2024
1 parent ae388d1 commit 6427f80
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Declaring `neoForge()` without a `modId` set will not create a mod or run configs. Can be used for a NeoForge library module.

## [0.16.7] - 2024-07-20

### Fixed
Expand Down
24 changes: 13 additions & 11 deletions refinedarchitect-plugin/src/main/kotlin/NeoForgeExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ open class NeoForgeExtension(private val project: Project) : BaseExtension(proje
project.extensions.getByType<NfExtension>().apply {
version.set(neoForgeVersion)
addModdingDependenciesTo(sourceSets["test"])
mods {
register(modId!!) {
modSourceSets.set(listOf(sourceSets["main"], sourceSets["test"]))
}
}
runs {
register("client") {
client()
if (modId != null) {
mods {
register(modId!!) {
modSourceSets.set(listOf(sourceSets["main"], sourceSets["test"]))
}
}
register("server") {
server()
programArgument("--nogui")
runs {
register("client") {
client()
}
register("server") {
server()
programArgument("--nogui")
}
}
}
parchment {
Expand Down

0 comments on commit 6427f80

Please sign in to comment.