diff options
author | nea <nea@nea.moe> | 2023-06-12 02:39:48 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-06-12 02:39:48 +0200 |
commit | 9508bcc851c736d807ae912e0e5b33e2654b46cc (patch) | |
tree | 6f2f08a265b8ba7d6a5042d64bcd603502d6d78e | |
parent | a1fb86f653a80a9029da65394ca95146dc570693 (diff) | |
download | Firmament-9508bcc851c736d807ae912e0e5b33e2654b46cc.tar.gz Firmament-9508bcc851c736d807ae912e0e5b33e2654b46cc.tar.bz2 Firmament-9508bcc851c736d807ae912e0e5b33e2654b46cc.zip |
Add mixin extras
-rw-r--r-- | build.gradle.kts | 8 | ||||
-rw-r--r-- | gradle/libs.versions.toml | 2 | ||||
-rw-r--r-- | src/main/java/moe/nea/firmament/init/MixinPlugin.java | 2 | ||||
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/MixinDrawContext.java | 2 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/FirmamentEvent.kt | 4 |
5 files changed, 14 insertions, 4 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 04cbbcb..f944d2a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -38,6 +38,11 @@ repositories { includeGroup("maven.modrinth") } } + maven("https://jitpack.io/") { + content { + includeGroupByRegex("(com|io)\\.github\\..+") + } + } maven("https://repo.sleeping.town") { content { includeGroup("com.unascribed") @@ -89,6 +94,9 @@ dependencies { modImplementation(libs.fabric.kotlin) modImplementation(libs.modmenu) modImplementation(libs.libgui) + implementation(libs.mixinextras) + include(libs.mixinextras) + annotationProcessor(libs.mixinextras) include(libs.libgui) modApi(libs.fabric.api) modApi(libs.architectury) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 18da4d7..06c7b2c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,6 +17,7 @@ citresewn = "1.1.3+1.20" hotswap_agent = "1.4.2-SNAPSHOT" sodium = "mc1.20-0.4.10" ncr = "Fabric-1.20-v2.2.0" +mixinextras = "0.2.0-beta.8" [libraries] @@ -30,6 +31,7 @@ repoparser = { module = "moe.nea:neurepoparser", version.ref = "neurepoparser" } dbus_java_core = { module = "com.github.hypfvieh:dbus-java-core", version.ref = "dbus_java" } dbus_java_unixsocket = { module = "com.github.hypfvieh:dbus-java-transport-native-unixsocket", version.ref = "dbus_java" } libgui = { module = "io.github.cottonmc:LibGui", version.ref = "libgui" } +mixinextras = { module = "com.github.LlamaLad7:MixinExtras", version.ref = "mixinextras" } # Runtime: hotswap = { module = "virtual.github.hotswapagent:hotswap-agent", version.ref = "hotswap_agent" } diff --git a/src/main/java/moe/nea/firmament/init/MixinPlugin.java b/src/main/java/moe/nea/firmament/init/MixinPlugin.java index 663c9d9..7d979ae 100644 --- a/src/main/java/moe/nea/firmament/init/MixinPlugin.java +++ b/src/main/java/moe/nea/firmament/init/MixinPlugin.java @@ -18,6 +18,7 @@ package moe.nea.firmament.init; +import com.llamalad7.mixinextras.MixinExtrasBootstrap; import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; @@ -29,6 +30,7 @@ public class MixinPlugin implements IMixinConfigPlugin { @Override public void onLoad(String mixinPackage) { + MixinExtrasBootstrap.init(); } @Override diff --git a/src/main/java/moe/nea/firmament/mixins/MixinDrawContext.java b/src/main/java/moe/nea/firmament/mixins/MixinDrawContext.java deleted file mode 100644 index a30eb11..0000000 --- a/src/main/java/moe/nea/firmament/mixins/MixinDrawContext.java +++ /dev/null @@ -1,2 +0,0 @@ -package moe.nea.firmament.mixins;public class MixinDrawContext { -} diff --git a/src/main/kotlin/moe/nea/firmament/events/FirmamentEvent.kt b/src/main/kotlin/moe/nea/firmament/events/FirmamentEvent.kt index 5da47ed..161c4c2 100644 --- a/src/main/kotlin/moe/nea/firmament/events/FirmamentEvent.kt +++ b/src/main/kotlin/moe/nea/firmament/events/FirmamentEvent.kt @@ -24,8 +24,8 @@ package moe.nea.firmament.events * Typically, that event bus is implemented as a companion object * * ``` - * class SomeEvent : NEUEvent() { - * companion object : NEUEventBus<SomeEvent>() + * class SomeEvent : FirmamentEvent() { + * companion object : FirmamentEventBus<SomeEvent>() * } * ``` */ |