Skip to content

Commit

Permalink
Did some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
XIAYM-gh committed Jul 12, 2024
1 parent 1d2512f commit 0a1d589
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"${mod_id}.mixins.json"
],
"depends": {
"minecraft": "${minecraft_dependency}"
"minecraft": ${minecraft_dependency}
},
"custom": {
"modmenu:clientsideOnly": true,
Expand Down
2 changes: 1 addition & 1 deletion versions/1.20.4/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Development Environment
java_version=17
minecraft_version=1.20.4
minecraft_dependency=1.20.x
minecraft_dependency=1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
yarn_mappings=1.20.4+build.3

# Compatible Libraries
Expand Down
2 changes: 1 addition & 1 deletion versions/1.20.6/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Development Environment
java_version=21
minecraft_version=1.20.6
minecraft_dependency=1.20.x
minecraft_dependency=1.20.5, 1.20.6
yarn_mappings=1.20.6+build.3

# Compatible Libraries
Expand Down
9 changes: 8 additions & 1 deletion versions/1.21/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import groovy.json.JsonBuilder

plugins {
id 'fabric-loom'
id 'com.replaymod.preprocess'
Expand Down Expand Up @@ -106,13 +108,18 @@ processResources {
into("assets/${project.mod_id}")
}

HashSet<?> mc_condition = []
Arrays.stream(project.minecraft_dependency.split(','))
.map { it.trim() }
.forEach { mc_condition.add(it) }

filesMatching('fabric.mod.json') {
filter { line ->
line.trim().startsWith('//') ? '' : line
}

expand([
'minecraft_dependency': project.minecraft_dependency,
'minecraft_dependency': new JsonBuilder(mc_condition),
'minecraft_version_id': project.minecraft_version.replace('.', '_'),
'minecraft_version' : project.minecraft_version,
'mod_description' : project.mod_description,
Expand Down

0 comments on commit 0a1d589

Please sign in to comment.