diff options
author | nea <romangraef@gmail.com> | 2022-08-27 01:38:49 +0200 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-08-27 01:38:49 +0200 |
commit | 973c13e84f8e091a6a920779103d96559dcd32a8 (patch) | |
tree | 95741faaa85509216a3a5130a3d8cd48b1b415fd /src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt | |
parent | 4c7bd601c4df4d03536e97e18e4b88d858330ad9 (diff) | |
download | firmament-973c13e84f8e091a6a920779103d96559dcd32a8.tar.gz firmament-973c13e84f8e091a6a920779103d96559dcd32a8.tar.bz2 firmament-973c13e84f8e091a6a920779103d96559dcd32a8.zip |
Switch to yarn mappings
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt index f017604..21834e9 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinMinecraft.kt @@ -1,19 +1,19 @@ package moe.nea.notenoughupdates.mixins import moe.nea.notenoughupdates.events.NEUScreenEvents -import net.minecraft.client.Minecraft -import net.minecraft.client.gui.screens.Screen +import net.minecraft.client.MinecraftClient +import net.minecraft.client.gui.screen.Screen 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 @Suppress("CAST_NEVER_SUCCEEDS") -@Mixin(Minecraft::class) +@Mixin(MinecraftClient::class) class MixinMinecraft { @Inject(method = ["setScreen"], at = [At("HEAD")], cancellable = true) - fun momo(screen: Screen?, ci: CallbackInfo) { - if (NEUScreenEvents.SCREEN_OPEN.invoker().onScreenOpen((this as Minecraft).screen, screen)) + fun onScreenChange(screen: Screen?, ci: CallbackInfo) { + if (NEUScreenEvents.SCREEN_OPEN.invoker().onScreenOpen((this as MinecraftClient).currentScreen, screen)) ci.cancel() } -}
\ No newline at end of file +} |