Skip to content

Commit f83608a

Browse files
fix MC-35361 (#422)
Co-authored-by: Xander <xander@isxander.dev>
1 parent 65d7274 commit f83608a

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
| Basic | [MC-577](https://bugs.mojang.com/browse/MC-577) | Mouse buttons block all inventory controls that are not default |
77
| Basic | [MC-4490](https://bugs.mojang.com/browse/MC-4490) | Fishing line not attached to fishing rod in third person while crouching |
88
| Basic | [MC-22882](https://bugs.mojang.com/browse/MC-22882) | Ctrl + Q won't work on Mac (disabled by default) |
9+
| Basic | [MC-35361](https://bugs.mojang.com/browse/MC-35361) | Inventory opening is detected while in Nether Portal |
910
| Basic | [MC-46503](https://bugs.mojang.com/browse/MC-46503) | You can retain a mob's shader in spectator mode by running /kill |
1011
| Basic | [MC-46766](https://bugs.mojang.com/browse/MC-46766) | Mining a block in Survival, then changing to Spectator creates a breaking animation and sound |
1112
| Basic | [MC-57057](https://bugs.mojang.com/browse/MC-57057) | Guardian laser attack sound ignores distance |
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package dev.isxander.debugify.client.mixins.basic.mc35361;
2+
3+
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
4+
import dev.isxander.debugify.fixes.BugFix;
5+
import dev.isxander.debugify.fixes.FixCategory;
6+
import net.minecraft.client.Minecraft;
7+
import net.minecraft.client.player.LocalPlayer;
8+
import net.minecraft.client.tutorial.Tutorial;
9+
import org.jetbrains.annotations.Nullable;
10+
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.Shadow;
12+
import org.spongepowered.asm.mixin.injection.At;
13+
14+
@BugFix(id = "MC-35361", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Inventory opening is detected while in Nether Portal")
15+
@Mixin(Minecraft.class)
16+
public class MinecraftMixin {
17+
@Shadow
18+
@Nullable
19+
public LocalPlayer player;
20+
21+
@WrapWithCondition(method = "handleKeybinds", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/tutorial/Tutorial;onOpenInventory()V"))
22+
private boolean addNetherPortalCheck(Tutorial instance) {
23+
return !this.player.portalProcess.isInsidePortalThisTick();
24+
}
25+
}

src/client/resources/debugify.client.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"basic.mc237493.TelemetryEventWidgetMixin",
3535
"basic.mc237493.TelemetryInfoScreenMixin",
3636
"basic.mc263865.KeyboardHandlerMixin",
37+
"basic.mc35361.MinecraftMixin",
3738
"basic.mc298558.AtmosphericFogEnvironmentMixin",
3839
"basic.mc268420.GuiMixin",
3940
"basic.mc4490.FishingHookRendererMixin",

0 commit comments

Comments
 (0)