NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

Pressing F3+F4 in a chest opens the game mode change menu, unlike in Minecraft Vanilla.

Open Lolothepro opened this issue 2 months ago • 3 comments

Minecraft Version: 1.21.10

NeoForge Version: 21.10.1-beta

Steps to Reproduce:

  1. Open a chest
  2. Press F3+F4

Description of issue:

Pressing F3+F4 in a chest opens the game mode change menu, unlike in Minecraft Vanilla.

Lolothepro avatar Oct 08 '25 19:10 Lolothepro

Here is the current research into this:

This seems to stem from a thing mezz reported in https://bugs-legacy.mojang.com/browse/MC-146650 and subsequently made a merged pr for in https://github.com/MinecraftForge/MinecraftForge/pull/5367. However, the bug was marked as invalid due to mezz's misinterpretation of the return value. However, the behavior still remained, which led to an issue where the abstract container screen would no longer catch and consume all inputs, leading to unexpected behavior of events further down the chain. There seemed to be an attempt to revert the issue in https://github.com/MinecraftForge/MinecraftForge/pull/6160, but it never got merged due to changes in event behavior. Most prevalently, ScreenEvent.KeyPressed.Post will no longer fire for container screens, given that the key is not technically handled but consumed by the container screen.

What solution should be pursued depends on whether we want to consider 'consumed' keys as 'handled' for the purposes of the event. I will wait for more comments for the @neoforged/maintainers team.

ChampionAsh5357 avatar Oct 08 '25 22:10 ChampionAsh5357

Given the inconsistency of how debug keys are applied in screens, I've elected to create an issue with Mojang on this topic: https://bugs.mojang.com/browse/MC/issues/MC-302641.

Further decision will wait until their response.

ChampionAsh5357 avatar Oct 08 '25 23:10 ChampionAsh5357

https://github.com/user-attachments/assets/106c3649-301c-4767-bcd6-9b48157bc108

Lolothepro avatar Oct 10 '25 20:10 Lolothepro