Skip to content

Commit

Permalink
fix: fix touch-mode player (phone player usually) block breaking with…
Browse files Browse the repository at this point in the history
… "delayed block breaking" option enabled
  • Loading branch information
smartcmd committed Feb 9, 2025
1 parent 8e57630 commit 4d862ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Unless otherwise specified, any version comparison below is the comparison of se
- Fixed the bug that `/alwaysday` command actually do the opposite thing.
- Several bugs in physics engine, including wrong collision detection and wrong movement calculation are fixed.
- Gamerule `doDaylightCycle` now works correctly.
- Fixed touch-mode player (phone player usually) block breaking with "delayed block breaking" option enabled

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ public class PlayerAuthInputPacketProcessor extends PacketProcessor<PlayerAuthIn
protected double stopBreakingTime;

private static boolean isInvalidGameType(EntityPlayer player) {
return player.getGameType() == GameType.CREATIVE ||
// TODO: implement canBreak & canPlace feature
player.getGameType() == GameType.ADVENTURE ||
// Creative mode player can break blocks just like they are in
// survival mode if "delayed block breaking" option is enabled
// TODO: implement canBreak & canPlace feature
return player.getGameType() == GameType.ADVENTURE ||
player.getGameType() == GameType.SPECTATOR;
}

Expand Down

0 comments on commit 4d862ad

Please sign in to comment.