Skip to content

Commit

Permalink
fix: 🐛 Fixed anvil upgrade to not close when backpack's keybind key i…
Browse files Browse the repository at this point in the history
…s pressed while item name is focused (usually when typing default B or any other common character in the input)
  • Loading branch information
P3pp3rF1y committed Sep 17, 2024
1 parent a60c6c9 commit 69823f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loader_version_range=[4,)
mod_id=sophisticatedbackpacks
mod_name=Sophisticated Backpacks
mod_license=GNU General Public License v3.0
mod_version=3.20.10
mod_version=3.20.11
mod_group_id=sophisticatedbackpacks
mod_authors=P3pp3rF1y, Ridanisaurus
mod_description=Fancy and functional backpacks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public BackpackScreen(BackpackContainer screenContainer, Inventory inv, Componen

@Override
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
if (getFocused() != null) {
return super.keyPressed(keyCode, scanCode, modifiers);
}
if (keyCode == 256 || KeybindHandler.BACKPACK_OPEN_KEYBIND.isActiveAndMatches(InputConstants.getKey(keyCode, scanCode))) {
if (getMenu().isFirstLevelStorage() && (keyCode == 256 || mouseNotOverBackpack())) {
if (getMenu().getBackpackContext().wasOpenFromInventory()) {
Expand Down

0 comments on commit 69823f0

Please sign in to comment.