aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/devenv
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/devenv')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/devenv/DisableCommonPacketWarnings.java3
-rw-r--r--src/main/java/moe/nea/firmament/mixins/devenv/IdentifyCloser.java21
-rw-r--r--src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java21
3 files changed, 44 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/devenv/DisableCommonPacketWarnings.java b/src/main/java/moe/nea/firmament/mixins/devenv/DisableCommonPacketWarnings.java
index ef4f2d6..9d8da05 100644
--- a/src/main/java/moe/nea/firmament/mixins/devenv/DisableCommonPacketWarnings.java
+++ b/src/main/java/moe/nea/firmament/mixins/devenv/DisableCommonPacketWarnings.java
@@ -1,5 +1,6 @@
/*
* SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe>
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
@@ -23,7 +24,7 @@ public class DisableCommonPacketWarnings {
@Inject(method = "warnOnUnknownPayload", at = @At("HEAD"), cancellable = true)
public void onCustomPacketError(CustomPayload customPayload, CallbackInfo ci) {
- if (Objects.equals(customPayload.id(), Identifier.of("badlion", "mods"))) {
+ if (Objects.equals(customPayload.getId(), Identifier.of("badlion", "mods"))) {
ci.cancel();
}
}
diff --git a/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyCloser.java b/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyCloser.java
new file mode 100644
index 0000000..f89eabe
--- /dev/null
+++ b/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyCloser.java
@@ -0,0 +1,21 @@
+/*
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.mixins.devenv;
+
+import net.minecraft.client.util.Window;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(Window.class)
+public class IdentifyCloser {
+ @Inject(method = "close", at = @At("HEAD"))
+ public void onClose(CallbackInfo ci) {
+ Thread.dumpStack();
+ }
+}
diff --git a/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java b/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java
new file mode 100644
index 0000000..a37e4ed
--- /dev/null
+++ b/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java
@@ -0,0 +1,21 @@
+/*
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.mixins.devenv;
+
+import net.minecraft.client.MinecraftClient;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(MinecraftClient.class)
+public class IdentifyStopperPatch {
+ @Inject(method = "scheduleStop", at = @At("HEAD"))
+ private void onStop(CallbackInfo ci) {
+ Thread.dumpStack();
+ }
+}