Commit Graph

396 Commits

Author SHA1 Message Date
Dylan K. Taylor
1c92d66ca4 LoginPacketHandler: stop bailing on unexpected JSON properties
the intent of this was noble (to make sure nothing was missed), but in practice throwing
errors on this stuff is just a pain in the ass. We don't actually need to care if the
properties are not used, since it doesn't affect the decoding (like it would for
a missing packet field), so the only reasons to complain are for BedrockProtocol to
have a complete picture of the protocol, and to make sure we're not discarding useful
information.

Log a warning in these cases instead, which should be noticed by developers without
being an unnecessary problem for users.

closes #6816
2025-09-26 23:04:23 +01:00
Dylan T.
31f4b496a1 Implement new OpenID authentication system (#6798)
Co-authored-by: Dries C <15795262+dries-c@users.noreply.github.com>
2025-09-20 22:40:38 +01:00
Dylan K. Taylor
7d50c9d146 Merge branch 'stable' of github.com:pmmp/PocketMine-MP into minor-next 2025-09-17 01:38:53 +01:00
Dylan K. Taylor
b237cacfc9 InGamePacketHandler: don't resync blocks if the client predicted an interact fail
if the prediction was a fail, we can assume that the client didn't do anything visual on its end,
which avoids the need to resend blocks.
This fixes block lag when towering as discussed in #6803.

The more general issue in #6803 remains unresolved (that the server's block resyncing may overwrite
additional client side predictions if it places a block before the server's resync for the initial
placement arrives), but that's more complicated to fix and I'm not convinced on the correct method
to resolve it yet.

In any case, this change nets a decent improvement for everyone, regardless.
2025-09-15 19:36:29 +01:00
Dylan K. Taylor
e7ad3c25fa InGamePacketHandler: ignore CREATIVE_PLAYER_DESTROY_BLOCK
fixes #6757

we get PREDICT_DESTROY_BLOCK anyway, so it's not needed
2025-09-15 18:02:10 +01:00
Dylan K. Taylor
54e8ad2a9c Update BedrockProtocol 2025-09-10 16:21:29 +01:00
Dylan T.
b2d0be5b75 Support editing the back side of signs (#6774)
* Deprecate BaseSign get/set/updateText(), add get/set/updateFaceText() which accepts true/false for front/back
* add isFrontFace() to SignChangeEvent
* add optional frontFace to Player::openSignEditor()
* add BaseSign::getFacingDegrees() and getHitboxCenter() which need to be implemented by subclasses
2025-09-01 17:15:29 +01:00
Dylan K. Taylor
f1b1e1977e Harden validation for server auth block breaking 2025-08-29 20:37:29 +01:00
Dylan K. Taylor
e375437439 ResourcePacksPacketHandler: harden checks for client responses 2025-08-12 20:11:35 +01:00
Dylan K. Taylor
11612ed0e2 Fixed content log warning about recipe with missing ID 2025-08-11 00:49:37 +01:00
Dries C
173b685b02 Bedrock 1.21.100 (#6760)
---------

Co-authored-by: Dylan T. <dktapps@pmmp.io>
2025-08-06 16:41:44 +01:00
ipad54
177fa76434 Disable client-side locator bar (#6743)
Without a propper server-side implementation, it just a mess of white dots of nearby players
2025-06-23 14:57:33 -05:00
Dylan K. Taylor
a662510cca Merge remote-tracking branch 'origin/stable' into minor-next 2025-06-18 19:56:02 +01:00
Dries C
9c71f4fc1c Assemble 1.21.90 (#6736) 2025-06-18 01:15:00 +01:00
Dylan K. Taylor
d053e9e168 Merge branch 'stable' into minor-next 2025-06-08 18:43:31 +01:00
Dylan T.
5ebbcd5d33 Move to newer systems for movement and block break handling (#6718)
MS is due to remove the non-server-auth versions of all of this stuff.

Fortunately v3 server auth movement works just fine without any changes,
although we will need to start sending player tick in some packets if
someone wants to actually use the rewind stuff.
2025-06-02 15:24:25 +01:00
Dylan K. Taylor
0910a219d4 Fixed improper pre-checking of PlayerAuthInputPacket flags 2025-05-28 23:29:37 +01:00
Dries C
5e830c7320 Protocol changes for 1.21.80 (#6687)
* Bedrock 1.21.80 support

* Update bedrock-data

* Add required tags to models

* Fixed biome data loading

* Support newest world format
apparently I messed up the blockstate data version last time around... it hasn't changed since 1.21.60

* always CS has to complain...

* Sync with release versions

* Ready 5.28.0 release

* this might help...

---------

Co-authored-by: Dylan T. <dktapps@pmmp.io>
2025-05-09 15:29:05 +01:00
Dries C
687112f4cd 5.27.0, Bedrock 1.21.70 support (#6665)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2025-03-27 15:48:19 +00:00
Dries C
91ac64783f Bedrock 1.21.60 (#6627)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2025-02-16 20:51:53 +00:00
Dylan K. Taylor
d1fa6edc50 InGamePacketHandler: fix weak comparisons 2025-01-06 23:08:18 +00:00
Dylan K. Taylor
9a6e258b6c Merge branch 'stable' of github.com:pmmp/PocketMine-MP into minor-next 2024-12-05 10:13:06 +00:00
Dries C
ba6828c6bd Release 5.22.0 (Bedrock 1.21.50 support) (#6559)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2024-12-04 13:36:52 +00:00
pmmp-restrictedactions-bot[bot]
ae9b4dbb05 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12111121061
2024-12-02 01:41:01 +00:00
Muqsit
44771c892d Use PlayerAuthInputPacket::SNEAKING flag to test for sneaking (#6544)
This binds internal sneaking to whether or not the player is currently pressing the shift key, which fixes #5792 and fixes #5903.

However, it does introduce visual issues with sneaking, as explained in #6548. This needs to be worked on separately. For now, it's better we trade 2 functional bugs for 1 visual bug.
2024-12-01 13:14:30 +00:00
Dylan K. Taylor
12ae8dc03b Merge branch 'stable' into minor-next 2024-11-25 14:32:30 +00:00
Dylan K. Taylor
5325ecee37 Deal with a whole lot of PHPStan suppressed key casting errors
closes #6534
2024-11-25 14:30:58 +00:00
Javier León
d3add78d3e Add support for basic entity picking via middle-click (#5397)
Support for more advanced stuff like NBT copying wasn't added in this PR, as the NBT used by PM is currently an inconsistent mess and doesn't play nice with vanilla. In the interests of avoiding this mess propagating, it's been left for another time.

Adds PlayerEntityPickEvent a la PlayerBlockPickEvent
and Entity->getPickedItem().
2024-11-15 21:27:10 +00:00
Dylan T.
ff695a5f97 PlayerInteractEvent: added APIs to independently control reaction of item and block (#4683)
This allows, for example, banning the usage of spawn eggs, without preventing opening of doors, without the need for item ID whitelists.

It also allows customizing the behaviour of item and block interactions when sneaking - it's now possible to force spawn eggs to work when sneaking, or force containers to open.

Finally, this also allows preventing any interaction at all without preventing block placement (by setting both to false). Since cancelling the event will typically prevent placement too (which might not be desired).

Side note: Blocks are now always synced when right-clicking on a block.
This differs from the previous behaviour, where the blocks were only synced when the action "failed".
However, since this change introduces a situation where the action may succeed but have different results than the client expects, it's best to just always sync blocks in this situation.

Fixes #3267
2024-11-15 21:19:54 +00:00
Dries C
4814db4fe7 Assemble 1.21.40 (#6471) 2024-10-25 14:21:51 +01:00
Dries C
60cac18104 Assemble 1.21.30 (#6453) 2024-09-20 18:47:25 -05:00
Dries C
ede363eb0f Fix shift crafting (#6433)
This field was added to the action in 1.21.20. Previously, the client would behave as if clicking the crafting result slot many times. Now it behaves more like recipe book shift-clicking.
2024-08-22 21:53:21 +01:00
Dries C
0f365886e0 Assemble 1.21.20 (#6423)
Co-authored-by: Dylan T. <dktapps@pmmp.io>
Co-authored-by: IvanCraft623 <ivancraft623@gmail.com>
2024-08-16 11:26:49 +01:00
Dylan K. Taylor
6077748caa Changes for 1.20.80 2024-04-25 11:31:41 +01:00
Dylan K. Taylor
a835069564 Merge remote-tracking branch 'origin/stable' into minor-next 2024-03-14 12:47:04 +00:00
Dylan K. Taylor
ba48f258f3 Support for 1.20.70 2024-03-13 14:53:27 +00:00
Dylan K. Taylor
dbc7105e5b Merge branch 'resource-pack-ack-receipts' into minor-next 2024-03-04 15:46:31 +00:00
Dylan K. Taylor
781e3643dd Clean up 2024-03-04 14:25:47 +00:00
Dylan K. Taylor
b9a1ef1357 Throttle resource pack sending using ack receipts
this isn't the best solution, as it limits the download speed somewhat, but it's relatively simple and works quite well.
closes #3127
2024-03-01 17:07:19 +00:00
Jason Wynn
90409b50d1 Allow offering different resource packs to different players (#6249)
closes #6248
2024-03-01 14:53:59 +00:00
Dylan K. Taylor
98042f844f Merge remote-tracking branch 'origin/stable' into minor-next 2024-02-28 17:36:21 +00:00
Dylan K. Taylor
a0cca53f52 Fixed mismatched predictions due to NBT key order differences
this is a pain :(
It appears the client always sorts the keys in alphabetical order due to use of std::map. However I'm not sure of the exact ordering behaviour, so it needs to be investigated.
2024-02-27 16:07:43 +00:00
Dylan K. Taylor
47f0119660 InGamePacketHandler: added an extra check 2024-02-26 14:35:21 +00:00
Dylan K. Taylor
6872661fd0 Harden JsonMapper on login JSON handling 2024-02-23 14:10:02 +00:00
Dylan K. Taylor
6492e7f4a2 1.20.60 support 2024-02-07 12:33:44 +00:00
Dylan K. Taylor
06b2e61d3c Merge remote-tracking branch 'origin/stable' into minor-next 2023-12-14 14:02:15 +00:00
Dylan K. Taylor
25cca1b63f Changes for 1.20.50 2023-12-06 14:29:23 +00:00
Dylan K. Taylor
b2df405cc0 NetworkSession: Send less information to clients on error disconnects
in particular, the information from VerifyLoginTask shouldn't be sent to clients, as it could contain sensitive information.
This change only affects disconnection screens. The server log shows the same amount of information as before (though formatted differently in some cases).
2023-11-29 16:31:59 +00:00
Tobias Grether
ee6d551729 Include TitleID in PlayerInfo extraData (#6054) 2023-09-21 14:48:50 +01:00
Dylan K. Taylor
fe3e2cc90a Merge branch 'stable' into minor-next 2023-09-20 19:14:34 +01:00