Skip to content

Commit e316fc1

Browse files
committed
Fix issue with mobile clients being unable to use shields properly
1 parent bcae220 commit e316fc1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/java/org/geysermc/geyser/session/cache/InputCache.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ public void processInputs(SessionPlayerEntity entity, PlayerAuthInputPacket pack
8686
.withRight(right)
8787
// https://mojang.github.io/bedrock-protocol-docs/html/enums.html
8888
// using the "raw" values allows us sending key presses even with locked input
89-
.withJump(bedrockInput.contains(PlayerAuthInputData.JUMP_CURRENT_RAW))
90-
.withShift(bedrockInput.contains(PlayerAuthInputData.SNEAK_CURRENT_RAW))
89+
// There appear to be cases where the raw value is not sent - e.g. sneaking with a shield on mobile (1.21.80)
90+
.withJump(bedrockInput.contains(PlayerAuthInputData.JUMP_CURRENT_RAW) || bedrockInput.contains(PlayerAuthInputData.JUMP_DOWN))
91+
.withShift(bedrockInput.contains(PlayerAuthInputData.SNEAK_CURRENT_RAW) || bedrockInput.contains(PlayerAuthInputData.SNEAK_DOWN))
9192
.withSprint(bedrockInput.contains(PlayerAuthInputData.SPRINT_DOWN));
9293

9394
// Send sneaking state before inputs, matches Java client

0 commit comments

Comments
 (0)