Skip to content

Commit

Permalink
Add forge source set and its associated mixin conf
Browse files Browse the repository at this point in the history
  • Loading branch information
NotStirred authored and CursedFlames committed Jan 24, 2024
1 parent c72a83f commit 392d8f9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
17 changes: 14 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ mcGitVersion {
setCommitVersion("570c0cbf0cdc15b8348a862a519d3399a943af9", "0.0")
}

//sourceSets {
sourceSets {
forge {
compileClasspath = sourceSets.main.compileClasspath
runtimeClasspath = sourceSets.main.runtimeClasspath
}
// create("gametest") {
// compileClasspath += configurations.compileClasspath
// compileClasspath += configurations.testCompileClasspath
Expand All @@ -43,7 +47,7 @@ mcGitVersion {
// runtimeClasspath += configurations.testRuntimeClasspath
// runtimeClasspath += sourceSets.main.output
// }
//}
}

tasks.register("generatePackageInfo") {
group = "filegen"
Expand Down Expand Up @@ -79,6 +83,13 @@ mixinGen {
it.injectorsDefaultRequire = 1
}

config(sourceSets.forge, "forge") {
it.required = true
it.conformVisibility = true
it.injectorsDefaultRequire = 1
it.configurationPlugin = "io.github.opencubicchunks.cubicchunks.mixin.ASMConfigPlugin"
}

config(sourceSets.test, "test") {
it.required = true
it.conformVisibility = true
Expand Down Expand Up @@ -174,7 +185,7 @@ runs {
jvmArguments args
// systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
modSource project.sourceSets.main
modSource project.sourceSets.forge
dependencies {
runtime project.configurations.libraries
}
Expand Down
17 changes: 17 additions & 0 deletions src/forge/resources/cubicchunks.mixins.forge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"required": true,
"package": "io.github.opencubicchunks.cubicchunks.mixin.forge",
"refmap": "CubicChunks-refmap.json",
"compatibilityLevel": "JAVA_17",
"minVersion": "0.8",
"injectors": {
"defaultRequire": 1
},
"overwrites": {
"conformVisibility": true
},
"mixins": [
],
"client": [],
"server": []
}
9 changes: 5 additions & 4 deletions src/main/resources/cubicchunks.mixins.core.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"mixins": [
"common.client.multiplayer.MixinClientLevel",
"common.server.MixinMinecraftServer",
"common.server.level.MixinChunkTaskPriorityQueue",
"common.server.level.MixinChunkTaskPriorityQueueSorter",
"common.server.level.MixinChunkTicketTracker",
Expand All @@ -24,17 +25,17 @@
"common.server.level.MixinServerLevel",
"common.server.level.MixinServerPlayer",
"common.server.level.MixinTickingTracker",
"common.server.MixinMinecraftServer",
"common.world.level.MixinLevel",
"common.world.level.MixinLevelReader",
"common.world.level.chunk.MixinChunkAccess",
"common.world.level.chunk.MixinChunkSource",
"common.world.level.chunk.MixinImposterProtoChunk",
"common.world.level.chunk.MixinLevelChunk",
"common.world.level.cube.MixinCubeAccess",
"common.world.level.cube.MixinImposterProtoCube",
"common.world.level.cube.MixinLevelCube",
"common.world.level.cube.MixinLevelCube$BoundTickingBlockEntity",
"common.world.level.cube.MixinLevelCube$RebindableTickingBlockEntityWrapper",
"common.world.level.chunk.MixinChunkSource",
"common.world.level.MixinLevel",
"common.world.level.MixinLevelReader",
"common.world.level.cube.MixinProtoCube"
],
"client": [],
Expand Down

0 comments on commit 392d8f9

Please sign in to comment.