aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorhackthetime <l4bg0jb7@duck.com>2023-11-22 18:51:07 +0100
committerhackthetime <l4bg0jb7@duck.com>2023-11-22 18:51:07 +0100
commit325e0c859eb84c065316a49c96f7ebb3faf8aaea (patch)
treea20e9bb611f6af63ab9d80225cafef1bf5d0a61f /forge
parentcc07573c35f5df8d81379db4cb6eaa5d6fc496c8 (diff)
downloadBBsentials-325e0c859eb84c065316a49c96f7ebb3faf8aaea.tar.gz
BBsentials-325e0c859eb84c065316a49c96f7ebb3faf8aaea.tar.bz2
BBsentials-325e0c859eb84c065316a49c96f7ebb3faf8aaea.zip
building config changes
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle.kts60
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java1
2 files changed, 31 insertions, 30 deletions
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts
index f222c1d..ea9d613 100644
--- a/forge/build.gradle.kts
+++ b/forge/build.gradle.kts
@@ -19,31 +19,6 @@ java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
withSourcesJar()
}
-
-// Minecraft configuration:
-loom {
- log4jConfigs.from(file("log4j2.xml"))
- launchConfigs {
- "client" {
- // If you don't want mixins, remove these lines
- property("mixin.debug", "true")
- property("asmhelper.verbose", "true")
- arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
- arg("--mixin", "mixins.$modid.json")
- }
- }
- forge {
- pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter())
- // If you don't want mixins, remove this lines
- mixinConfig("mixins.$modid.json")
- }
- // If you don't want mixins, remove these lines
- mixin {
- defaultRefmapName.set("mixins.$modid.refmap.json")
- }
-}
-
-
// Dependencies:
repositories {
@@ -54,11 +29,17 @@ repositories {
maven("https://maven.notenoughupdates.org/releases/")
}
+val devenvMod by configurations.creating {
+ isTransitive = false
+ isVisible = false
+}
val shadowImpl: Configuration by configurations.creating {
configurations.implementation.get().extendsFrom(this)
}
+
+// Minecraft configuration:
dependencies {
implementation(project(":common"))
minecraft("com.mojang:minecraft:1.8.9")
@@ -72,12 +53,36 @@ dependencies {
shadowImpl("org.notenoughupdates.moulconfig:MoulConfig:1.3.0")
// testMod("org.notenoughupdates.moulconfig:MoulConfig:1.3.0:test")
annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT")
-
+ "devenvMod"("org.notenoughupdates.moulconfig:MoulConfig:1.3.0:test")
// If you don't want to log in with your real minecraft account, remove this line
runtimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.2")
}
+loom {
+ log4jConfigs.from(file("log4j2.xml"))
+ launchConfigs {
+ "client" {
+ // If you don't want mixins, remove these lines
+ property("mixin.debug", "true")
+ property("asmhelper.verbose", "true")
+ arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
+ arg("--mixin", "mixins.$modid.json")
+ arg("--mods", devenvMod.resolve().joinToString(",") { it.relativeTo(file("run")).path })
+ }
+ }
+
+ forge {
+ pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter())
+ // If you don't want mixins, remove this lines
+ mixinConfig("mixins.$modid.json")
+ }
+ // If you don't want mixins, remove these lines
+ mixin {
+ defaultRefmapName.set("mixins.$modid.refmap.json")
+ }
+}
+
// Tasks:
tasks.withType(JavaCompile::class) {
@@ -144,7 +149,4 @@ sourceSets {
}
}
}
-
-
-
tasks.assemble.get().dependsOn(tasks.remapJar) \ No newline at end of file
diff --git a/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java b/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java
index 93ecd99..4d50a4e 100644
--- a/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java
+++ b/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java
@@ -35,7 +35,6 @@ public class MoulConfig extends Config {
public String getTitle() {
return "BBsentials " + de.hype.bbsentials.common.client.Config.apiVersion;
}
-
@Override
public void saveNow() {
config.save();