diff options
author | Linnea Gräf <nea@nea.moe> | 2024-04-26 18:04:45 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-04-26 18:15:54 +0200 |
commit | 7e0151569477df63601be50c82177ecfd21e5deb (patch) | |
tree | f30e5440a1855de92d2b424ef79339d3d6cf5f34 /src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.java | |
parent | 041da7c7d179df01c4048a81ddf40a9f13c3ce77 (diff) | |
download | Firmament-7e0151569477df63601be50c82177ecfd21e5deb.tar.gz Firmament-7e0151569477df63601be50c82177ecfd21e5deb.tar.bz2 Firmament-7e0151569477df63601be50c82177ecfd21e5deb.zip |
Bump to 1.20.5
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.java')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.java b/src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.java index 25ba0eb..06d6202 100644 --- a/src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/ChatPeekingPatch.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 */ @@ -11,16 +12,17 @@ import moe.nea.firmament.features.fixes.Fixes; import net.minecraft.client.gui.hud.ChatHud; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyVariable; @Mixin(ChatHud.class) public class ChatPeekingPatch { - @ModifyExpressionValue(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/ChatHud;isChatFocused()Z")) + @ModifyVariable(method = "render", at = @At(value = "HEAD"), index = 5, argsOnly = true) public boolean onGetChatHud(boolean old) { return old || Fixes.INSTANCE.shouldPeekChat(); } - @ModifyExpressionValue(method = "getHeight", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/ChatHud;isChatFocused()Z")) + @ModifyExpressionValue(method = "getHeight()I", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/ChatHud;isChatFocused()Z")) public boolean onGetChatHudHeight(boolean old) { return old || Fixes.INSTANCE.shouldPeekChat(); } |