You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Press F (the keybind for Swap Item with Offhand) on an empty slot in the player's inventory
Observe that no action occurs
Press F on a slot with items in the player's inventory
Observe that no action occurs
Remove the item from the offhand slot
Press F on a slot with items in the player's inventory
Observe that no action occurs
Description of issue:
Minecraft 1.16 added the ability to switch items to and from the offhand slot within an inventory by pressing F (or the key bound to Swap Item with Offhand) on an inventory or armor slot. However, on the tested version of Forge, no switching occurs.
I have tested on Vanilla 1.16.1 that the given steps do activate the aforementioned ability in the survival, creative, adventure player inventories, and the chest and hopper inventories.
I have tested on the given Forge 1.16.1 version that the given steps do not activate the aforementioned ability in the survival, creative, adventure player inventories, and the chest and hopper inventories.
I have found the cause of the issue: the Swap Item with Offhand keybind has the IN_GAME set as its IKeyConflictContext, which makes the key only work when the player is not in a GUI. The method responsible for setting the keybind's conflict context is GameSettings#setForgeKeybindProperties, which is called automatically by the constructor.
I have tested a fix by using debugging tools and manually setting the conflict context back to UNIVERSAL, and the switching action works. A fix for this is simple: removing the line that sets the conflict context of the keybind in question. (I'm trying to make a fix PR, but extractRangeMapstill hates me)
Minecraft Version: 1.16.1
Forge Version: 32.0.47
Logs: not applicable, ingame behavior issue
Steps to Reproduce:
F
(the keybind forSwap Item with Offhand
) on an empty slot in the player's inventoryF
on a slot with items in the player's inventoryF
on a slot with items in the player's inventoryDescription of issue:
Minecraft 1.16 added the ability to switch items to and from the offhand slot within an inventory by pressing
F
(or the key bound toSwap Item with Offhand
) on an inventory or armor slot. However, on the tested version of Forge, no switching occurs.I have tested on Vanilla 1.16.1 that the given steps do activate the aforementioned ability in the survival, creative, adventure player inventories, and the chest and hopper inventories.
I have tested on the given Forge 1.16.1 version that the given steps do not activate the aforementioned ability in the survival, creative, adventure player inventories, and the chest and hopper inventories.
Original bug report from the Forge Support Forum.
The text was updated successfully, but these errors were encountered: