118 Commits

Author SHA1 Message Date
Dylan K. Taylor
c8320fe849
Merge branch 'next-minor' into next-major 2022-07-14 20:50:49 +01:00
Dylan K. Taylor
e2855aadff
Simplify handling of broken transactions for crafting and friends
this allows stuff like smithing tables to work without needing any extra hacks.

Implementing enchanting or anvils would require some extra work, but I don't plan to implement those under the legacy transaction system anyway.
2022-07-14 20:50:06 +01:00
Dylan K. Taylor
dea0207e4e
Merge branch 'next-minor' into next-major 2022-07-13 17:06:04 +01:00
Dylan K. Taylor
06655bee78
Updated to 1.19.10 2022-07-13 00:59:49 +01:00
Dylan K. Taylor
aa9f8781ff
Merge branch 'next-minor' into next-major 2022-06-07 19:56:26 +01:00
Dylan K. Taylor
4ec97d0f7a
InGamePacketHandler: added missing break
I'm getting sloppy ...
2022-06-07 17:52:59 +01:00
Dylan K. Taylor
016a80bb70
1.19.0 changes 2022-06-07 17:47:13 +01:00
Dylan K. Taylor
083a35f970
Modernize property type declarations 2022-06-04 18:16:32 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
6eac2ea7a5
Modernize private property declarations in src/network 2022-05-17 21:22:33 +01:00
Rush2929
741182c55f
InGamePacketHandler: skip processing movement if the player's position
was changed during processing other properties (#4913)

fixes #4952
2022-04-10 21:02:45 +01:00
Dylan K. Taylor
ea677154cb
InGamePacketHandler: rely exclusively on prediction mismatch checking to re-sync slots during bad transactions
fixes #4894
closes #4926
relying on the core code to guess which slots should be synced is unreliable at best.
2022-04-04 21:58:19 +01:00
Dylan K. Taylor
90a8595a40
Check for mismatched inventory slot predictions in transactions
this should limit the problems caused by mismatched gameplay features that result in ghost items, such as #4896.
2022-03-22 17:42:19 +00:00
Dylan K. Taylor
4f25ab10e9
InventoryManager: Do not sync slots the client correctly predicted during using items
closes #4825
2022-02-22 16:46:23 +00:00
Dylan K. Taylor
b26b1cd32f
Fixed swimming hitbox glitch
fixes #4815
relates to Sandertv/gophertunnel#88
2022-02-19 20:14:17 +00:00
Dylan K. Taylor
d9ea647925
InGamePacketHandler: add a hack for swimming AABB client bug 2022-01-27 00:28:54 +00:00
Dylan K. Taylor
82f1c2766c
Merge branch 'stable' into next-minor 2022-01-22 01:00:40 +00:00
Dylan K. Taylor
c10eda5eae
InGamePacketHandler: limit depth of form responses to 2
form responses should only contain string|int|float|bool|null. Arrays or objects appearing in here are likely malicious.
2022-01-21 19:11:58 +00:00
Dylan K. Taylor
387c13beff
InGamePacketHandler: fixed invalid JSON being treated as form close 2022-01-21 18:32:58 +00:00
Dylan K. Taylor
56fe71d939
InGamePacketHandler: fixed crash in form handling when invalid JSON is given 2022-01-21 17:34:13 +00:00
Dylan K. Taylor
be1996752a
Replace disallowed operators in src/network/ 2022-01-20 19:11:32 +00:00
Dylan K. Taylor
853ecd2408
InGamePacketHandler: fix function ordering 2022-01-16 16:16:42 +00:00
Dylan K. Taylor
33421258b6
Silence MovePlayerPacket debug spam 2022-01-16 15:40:18 +00:00
Dylan K. Taylor
42d07c74d7
added missing redstone power flag logic 2022-01-15 22:19:47 +00:00
ipad54
1366c49f1f
Implemented Lectern (#4708)
Co-authored-by: Covered123 <58715544+JavierLeon9966@users.noreply.github.com>
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2022-01-15 21:21:29 +00:00
Dylan K. Taylor
ee6548aa50
Merge branch 'stable' into next-minor 2022-01-14 00:45:49 +00:00
Dylan K. Taylor
f126479c37
InGamePacketHandler: check the validity of facing values given by the client 2022-01-13 21:21:15 +00:00
Dylan K. Taylor
fb29653ed7
Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-06 22:43:57 +00:00
Dylan T
3ed57ce49a
Merge pull request from GHSA-p62j-hrxm-xcxf
This checks the following things:
- Validity of UTF-8 encoding of title, author, and page content
- Maximum soft and hard lengths of title, author, and page content (soft
  limits may be bypassed by uncancelling PlayerEditBookEvent; hard
  limits may not be bypassed)
- Maximum number of pages. Books with more than 50 pages may still be
  edited, but may not have new pages added.
2022-01-04 20:39:02 +00:00
Dylan K. Taylor
8532e9c8e0
Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-04 14:38:15 +00:00
Dylan K. Taylor
e43e0189df
InGamePacketHandler: do not pass bare integers from BookEditPacket directly into event
while these currently happen to be identical, they may not be in the future.

Really this should be represented by an enum.
2022-01-03 20:20:32 +00:00
Covered123
bcc0f1e733
Fixed desynchronization of hunger when cancelling food-related events (#4691) 2022-01-03 19:11:32 +00:00
Dylan K. Taylor
0a0de018a5
InGamePacketHandler: fixed player jump handling 2021-12-29 18:28:22 +00:00
Dylan K. Taylor
a1d217e12b
InGamePacketHandler: fixed missing synchronization of metadata when plugins cancel PlayerToggle*Event 2021-12-29 18:23:05 +00:00
Dylan K. Taylor
e102339637
InGamePacketHandler: remove dead code from PlayerActionPacket handling 2021-12-29 17:29:19 +00:00
Dylan K. Taylor
18e26d975b
Fixed swimming and gliding for PlayerAuthInputPacket 2021-12-19 17:31:47 +00:00
XenialDan
d41f933e7b
Implement swimming/gliding including AABB recalculation (#4446)
- The following events have been added:
  - PlayerToggleGlideEvent
  - PlayerToggleSwimEvent
- The following API methods have been added:
  - Entity->getSize()
  - Living->isSwimming()
  - Living->setSwimming()
  - Living->isGliding()
  - Living->setSwimming()
  - Player->toggleSwim()
  - Player->toggleGlide()
2021-12-19 17:10:41 +00:00
Dylan K. Taylor
44e8603a6d
InGamePacketHandler: fixed borked sneak/sprint after switch to PlayerAuthInputPacket
closes #4659
2021-12-19 00:52:53 +00:00
Dylan K. Taylor
d487e43766
InGamePacketHandler: fixed block breaking borked by enabling PlayerAuthInputPacket 2021-12-15 04:01:40 +00:00
Dylan K. Taylor
292827a311
Switch to PlayerAuthInputPacket for movement handling
sticking with the non-rewind version for now, for simplicity's sake.

We do want the rewind version at some point for server side knockback, but that's a job for later.

For now, using this packet fixes various problems with slightly-incorrect positions and rotations (e.g. AimTP no longer requires you to jump to get the exact correct rotation; previously it would hit the wrong block at long distances due to errors of a fraction of a degree due to the client not sending its position.

Note that this might cause some performance degradation since the packet is sent every tick. This has yet to be assessed, but the advantages offered are undeniable in any case.
2021-12-09 13:53:53 +00:00
Dylan K. Taylor
c7beb0a702
Clean up inventory auto close mess from PM3
on PM3 there was no concept of 'current window', we had no idea which window the player was actually looking at.
2021-11-08 23:51:25 +00:00
Dylan K. Taylor
6fdcfb01c8
Seal up main inventory open/close logic inside InventoryManager where it belongs 2021-11-08 22:58:06 +00:00
Dylan K. Taylor
45edb94607
Crafting tables now work the same way as anvils and enchanting tables
Removing almost all special-case logic for crafting tables.
2021-11-07 16:20:07 +00:00
Hashim
f066199971
Implement emote support (#4523) 2021-11-02 23:04:55 +00:00
Dylan K. Taylor
c580bb2434
InGamePacketHandler: mark player as not using item in more cases
fixes #4355
2021-10-31 14:41:31 +00:00
Dylan K. Taylor
04aedc6494
Updated BedrockProtocol 2021-10-23 23:54:49 +01:00
Dylan K. Taylor
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef 2021-10-23 01:16:45 +01:00
Dylan K. Taylor
817ab88c70
Properly handle errors decoding network item NBT
since the NBT is now decoded immediately now, any incorrect NBT will cause exceptions to be thrown that we weren't handling, causing server crashes.
2021-10-05 19:10:55 +01:00
Dylan K. Taylor
7701e1ff98
InGamePacketHandler: fix regression in movement handling since 82c8fa696a2e8609d8ae086c52f96abe7c7705b6
fixes #4291
fixes #4398
2021-09-10 16:52:46 +01:00
Dylan K. Taylor
c5abae9eaa
Fixed merge error in bbf3f4c476bb203f399b7631a7d69013980bbae8
the corresponding code on PM3 was originally removed here: 485f573955 (diff-cf181dff0292664e4aa13c8a1731dc62131489fa404f4ac1357493d320264cceL2263)
2021-07-17 22:59:45 +01:00