Skip to content

Commit

Permalink
修复测试运行forge找不到类错误,修正版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
reserveword committed May 26, 2024
1 parent 94b5908 commit 21387b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'eclipse'
id 'idea'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'fabric-loom' version "$loom_version"
}

loom {
Expand Down
15 changes: 15 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ plugins {
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

sourceSets {
main
common
}

runs {
client {
systemProperty 'forge.logging.markers', 'REGISTRIES'
Expand All @@ -16,6 +21,7 @@ runs {
systemProperty 'neoforge.enabledGameTestNamespaces', mod_id

modSource sourceSets.main
modSource sourceSets.common
}
}

Expand All @@ -26,3 +32,12 @@ dependencies {

implementation project(':common')
}

tasks.register('feedbackCommonClass', Copy) {
dependsOn ':common:build'
shouldRunAfter ':forge:neoFormStripServer'
from project(':common').layout.buildDirectory.dir('classes/java/main')
into project.layout.buildDirectory.dir('classes/java/common')
}

project.runClient.dependsOn 'feedbackCommonClass'
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ minecraft_version=1.20.4
# mod
mod_id=imblocker
mod_name=IMBlocker
mod_version=4.0.7
mod_version=4.0.9b
mod_logo=imblocker.png
mod_description=Blocks Input Methods when you're not using it.\\n在你不打字的时候自动关闭输入法
mod_url=https://github.com/reserveword/IMBlocker
Expand All @@ -23,6 +23,7 @@ [email protected]
fabric_version=0.96.0+1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.6
loom_version=1.5-SNAPSHOT

# forge
loader_version_range=[2.0,)
Expand Down

0 comments on commit 21387b0

Please sign in to comment.