The fix by @TriWonder81 resolves the bug, but it creates a new one: When pressing F3+F4+ESC and then releasing F3, the debug menu will open, which doesn't happen without the fix. This occurs because when pressing F3+F4, this.switchF3State is set to false, but when pressing ESC to exit the screen, this.switchF3State isn't changed, which means the F3 menu will open when F3 is released.
Both the initial and the new bug can be fixed by adding setSwitchF3State method to net.minecraft.client.Keyboard.java:
The fix by @TriWonder81 resolves the bug, but it creates a new one:
When pressing F3+F4+ESC and then releasing F3, the debug menu will open, which doesn't happen without the fix. This occurs because when pressing F3+F4,
this.switchF3State
is set to false, but when pressing ESC to exit the screen,this.switchF3State
isn't changed, which means the F3 menu will open when F3 is released.Both the initial and the new bug can be fixed by adding
setSwitchF3State
method tonet.minecraft.client.Keyboard.java:
and changing
switchF3State
incheckForClose
method ofnet.minecraft.client.gui.screen.GameModeSelectionScreen.java
:so, when
GameModeSelectionScreen
closes by releasing F3,switchF3State
is set to false, otherwise, when ESC is pressed, it is true.