aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt
deleted file mode 100644
index 3bc1a5f..0000000
--- a/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package moe.nea.notenoughupdates.mixins
-
-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
-import net.minecraft.client.MinecraftClient
-import net.minecraft.client.gui.screen.Screen
-import moe.nea.notenoughupdates.events.ScreenOpenEvent
-
-@Suppress("CAST_NEVER_SUCCEEDS")
-@Mixin(MinecraftClient::class)
-class MixinMinecraft {
- @Inject(method = ["setScreen"], at = [At("HEAD")], cancellable = true)
- fun onScreenChange(screen: Screen?, ci: CallbackInfo) {
- val event = ScreenOpenEvent((this as MinecraftClient).currentScreen, screen)
- if (ScreenOpenEvent.publish(event).cancelled)
- ci.cancel()
- }
-}