Skip to content

Commit b8977aa

Browse files
committed
WIP for NF 1.20.4 support
1 parent 501c973 commit b8977aa

21 files changed

+40
-4116
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ build-out/
4545
src/generated/
4646

4747
neoforge-main/src/generated/
48+
49+
neoforge-main/runs/

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ neoforge_version=20.4.3-beta
1010
neo_version_range=[20.4,)
1111
loader_version_range=[1,)
1212

13-
core_version=4.0.7
13+
core_version=4.0.8
1414

1515
mod_id=compactcrafting
1616

neoforge-main/build.gradle.kts

Lines changed: 32 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ val mod_id: String by extra
1717
val isRelease: Boolean = (System.getenv("CC_RELEASE") ?: "false").equals("true", true)
1818

1919
val neoforge_version: String by extra
20+
val coreVersion: String = property("core_version") as String
2021

2122
base {
2223
archivesName.set(mod_id)
@@ -32,6 +33,7 @@ jarJar.enable()
3233

3334
configurations {
3435
create("mcLibrary") {}
36+
3537
implementation {
3638
extendsFrom(configurations.findByName("mcLibrary"))
3739
}
@@ -64,7 +66,8 @@ runs {
6466
systemProperty("forge.logging.console.level", "debug")
6567

6668
dependencies {
67-
runtime(configuration(configurations.findByName("mcLibrary")))
69+
// runtime("dev.compactmods.compactcrafting:core-api:$coreVersion")
70+
runtime("io.reactivex.rxjava3:rxjava:3.1.5")
6871
}
6972

7073
// ideaModule("Compact_Crafting.forge-main.main")
@@ -74,27 +77,30 @@ runs {
7477
create("client") {
7578
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
7679
systemProperty("forge.enabledGameTestNamespaces", mod_id)
80+
81+
programArguments("--username", "Nano")
82+
programArguments("--width", "1920")
83+
programArguments("--height", "1080")
7784
}
7885

79-
// server {
80-
// systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
81-
// programArgument '--nogui'
82-
// }
83-
//
84-
// // This run config launches GameTestServer and runs all registered gametests, then exits.
85-
// // By default, the server will crash when no gametests are provided.
86-
// // The gametest system is also enabled by default for other run configs under the /test command.
87-
// gameTestServer {
88-
// systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
89-
// }
90-
//
91-
// data {
92-
// // example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
93-
// // workingDirectory project.file('run-data')
94-
//
95-
// // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
96-
// programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
97-
// }
86+
create("server") {
87+
workingDirectory(file("run/server"))
88+
environmentVariables("CC_TEST_RESOURCES", project.file("src/test/resources").path)
89+
}
90+
91+
create("data") {
92+
workingDirectory(file("run/data"))
93+
94+
programArguments("--mod", "compactcrafting")
95+
programArguments("--all")
96+
programArguments("--output", file("src/generated/resources/").path)
97+
programArguments("--existing", file("src/main/resources").path)
98+
}
99+
100+
create("gameTestServer") {
101+
workingDirectory(file("run/gametest"))
102+
environmentVariables("CC_TEST_RESOURCES", file("src/test/resources").path)
103+
}
98104
}
99105

100106
repositories {
@@ -109,89 +115,19 @@ repositories {
109115
}
110116
}
111117

112-
val coreVersion: String = property("core_version") as String
113118
dependencies {
114119
implementation("net.neoforged:neoforge:${neoforge_version}")
115120

116-
implementation("dev.compactmods.compactcrafting", "core-api", coreVersion)
117-
"mcLibrary" (jarJar("dev.compactmods.compactcrafting", "core-api", "[$coreVersion]") {
118-
isTransitive = false
119-
})
121+
// implementation("dev.compactmods.compactcrafting", "core-api", coreVersion)
122+
// jarJar("dev.compactmods.compactcrafting", "core-api", "[$coreVersion]") {
123+
// isTransitive = false
124+
// }
120125

121-
"mcLibrary" (implementation("io.reactivex.rxjava3", "rxjava", "3.1.5"))
126+
implementation("io.reactivex.rxjava3", "rxjava", "3.1.5")
122127
jarJar("io.reactivex.rxjava3", "rxjava", "[3.1.0,3.2)")
123128
jarJar("org.reactivestreams", "reactive-streams", "[1.0.4,)")
124129
}
125130

126-
//
127-
//minecraft {
128-
// mappings("parchment", parchment_version)
129-
//
130-
// // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
131-
// accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))
132-
//
133-
// // Default run configurations.
134-
// // These can be tweaked, removed, or duplicated as needed.
135-
// runs {
136-
// all {
137-
// property("mixin.env.remapRefMap", "true")
138-
// property("mixin.env.refMapRemappingFile", "${buildDir}/createSrgToMcp/output.srg")
139-
//
140-
//
141-
//
142-
// ideaModule("Compact_Crafting.forge-main.main")
143-
//
144-
// mods.create(mod_id) {
145-
// source(sourceSets.main.get())
146-
// for (p in runDepends)
147-
// source(p.sourceSets.main.get())
148-
// }
149-
// }
150-
//
151-
// create("client") {
152-
// taskName("runClient")
153-
// workingDirectory(file("run/client"))
154-
//
155-
// args("--username", "Nano")
156-
// args("--width", 1920)
157-
// args("--height", 1080)
158-
// }
159-
//
160-
// create("server") {
161-
// taskName("runServer")
162-
// workingDirectory(file("run/server"))
163-
// environment("CC_TEST_RESOURCES", file("src/test/resources"))
164-
//
165-
// mods.named(mod_id) {
166-
// source(sourceSets.test.get())
167-
// }
168-
// }
169-
//
170-
// create("data") {
171-
// taskName("runData")
172-
// workingDirectory(file("run/data"))
173-
//
174-
// args("--mod", "compactcrafting")
175-
// args("--all")
176-
// args("--output", file("src/generated/resources/"))
177-
// args("--existing", file("src/main/resources"))
178-
//
179-
// forceExit(false)
180-
// }
181-
//
182-
// create("gameTestServer") {
183-
// taskName("runGameTestServer")
184-
// workingDirectory(file("run/gametest"))
185-
// environment("CC_TEST_RESOURCES", file("src/test/resources"))
186-
//
187-
// forceExit(false)
188-
//
189-
// mods.named(mod_id) {
190-
// source(sourceSets.test.get())
191-
// }
192-
// }
193-
// }
194-
//}
195131
//
196132
//repositories {
197133
// mavenLocal()
@@ -236,6 +172,7 @@ dependencies {
236172
// runtimeOnly(fg.deobf("curse.maven:spark-361579:3875647"))
237173
//}
238174
//
175+
239176
tasks.withType<ProcessResources> {
240177
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
241178
}

neoforge-main/runs/client/crash-reports/crash-2023-12-08_21.07.20-fml.txt

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)