aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorHacktheTime <l4bg0jb7@duck.com>2023-10-13 19:43:18 +0200
committerHacktheTime <l4bg0jb7@duck.com>2023-10-13 19:43:36 +0200
commit29ba70a5b682bbd430df1eb626a19422a6e08270 (patch)
tree52ce9290e47b10453a937b111b986da3a98ea682 /forge
parente3d509924c44678e6c8f07bd0e33a75db894c810 (diff)
downloadBBsentials-29ba70a5b682bbd430df1eb626a19422a6e08270.tar.gz
BBsentials-29ba70a5b682bbd430df1eb626a19422a6e08270.tar.bz2
BBsentials-29ba70a5b682bbd430df1eb626a19422a6e08270.zip
working 2 separate sub projects. some more tweaks need to be done though
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle.kts (renamed from forge/build.gradle)24
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java2
2 files changed, 17 insertions, 9 deletions
diff --git a/forge/build.gradle b/forge/build.gradle.kts
index 2b7af90..6f42b2c 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle.kts
@@ -1,12 +1,19 @@
plugins {
- id("idea")
- id("java")
+ idea
+ java
id("gg.essential.loom") version "0.10.0.+"
id("dev.architectury.architectury-pack200") version "0.1.3"
id("com.github.johnrengelman.shadow") version "8.1.1"
- id("com.bnorm.power.kotlin-power-assert") version "0.13.0"
}
+//Constants:
+
+val baseGroup: String by project
+val mcVersion: String by project
+val version: String by project
+val mixinGroup = "$baseGroup.mixin"
+val modid: String by project
+
// Toolchains:
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
@@ -27,11 +34,11 @@ loom {
forge {
pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter())
// If you don't want mixins, remove this lines
- mixinConfig("mixins.bbsentials.json")
+ mixinConfig("mixins.$modid.json")
}
// If you don't want mixins, remove these lines
mixin {
- defaultRefmapName.set("mixins.bbsentials.refmap.json")
+ defaultRefmapName.set("mixins.$modid.refmap.json")
}
}
@@ -94,10 +101,8 @@ tasks.processResources {
filesMatching(listOf("mcmod.info", "mixins.$modid.json")) {
expand(inputs.properties)
- rename { fileName ->
- fileName.replaceAll("(.+_at.cfg)", "META-INF/" + fileName)
- }
}
+ rename("(.+_at.cfg)", "META-INF/$1")
}
@@ -121,6 +126,9 @@ tasks.shadowJar {
println("Copying jars into mod: ${it.files}")
}
}
+
+ // If you want to include other dependencies and shadow them, you can relocate them in here
+ fun relocate(name: String) = relocate(name, "$baseGroup.deps.$name")
}
tasks.assemble.get().dependsOn(tasks.remapJar)
diff --git a/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java b/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java
index 94ab673..f7e4260 100644
--- a/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java
+++ b/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java
@@ -274,7 +274,7 @@ public class BBsentialConnection {
throw new RuntimeException(arguments[1]);
}
else if (arguments[0].equals("hub")) {
-//TODO BBsentials.config.sender.addHiddenSendTask("/hub", 1);
+ BBsentials.config.sender.addHiddenSendTask("/hub", 1);
}
}
if (BBsentials.getConfig().isDetailedDevModeEnabled()) {