Commit Graph

135 Commits

Author SHA1 Message Date
Dylan K. Taylor
f51717323b Merge branch 'stable' into item-stack-request 2023-01-03 19:53:25 +00:00
Dylan K. Taylor
0e4b79ea77 InGamePacketHandler: fixed client-side predictions not getting rolled back for block placement 2023-01-03 19:43:21 +00:00
Dylan K. Taylor
b312e93176 Limit list max size in transactions
this duct tape is to limit the impact of a security vulnerability being actively exploited.
2023-01-02 22:59:48 +00:00
Dylan K. Taylor
1cefe24414 InGamePacketHandler: fixed transaction predictions not getting rolled back for failed use/release/interact transactions
this was caused by b5cfab497d.
2022-12-10 21:16:08 +00:00
Dylan K. Taylor
b5cfab497d Clean up inventory content syncing, fixes #5441
these remnants should have been cleaned up in 4.11, but I somehow managed to skip over them.
2022-12-04 23:05:30 +00:00
Dylan K. Taylor
0039af984d Merge branch 'next-minor' into item-stack-request 2022-10-16 16:56:26 +01:00
Dylan K. Taylor
89e29448ee Merge branch 'stable' into next-minor 2022-09-20 20:18:06 +01:00
Dylan K. Taylor
d459afaa54 fix CS 2022-09-20 20:00:40 +01:00
Dylan K. Taylor
db586233da Changes for 1.19.30 support 2022-09-20 19:50:27 +01:00
Dylan K. Taylor
3235d128e5 Fixed handling of fake requests during block placement and other actions 2022-08-18 18:25:49 +01:00
Dylan K. Taylor
2b7510945a First look at ItemStackRequest usage (very unstable) 2022-08-18 17:38:57 +01:00
Dylan K. Taylor
f7ab0a3b92 Merge branch 'stable' into next-minor 2022-08-14 18:37:56 +01:00
Dylan K. Taylor
df7a1fcba6 Changes for 1.19.20 2022-08-09 19:06:05 +01:00
Dylan K. Taylor
16ed16722a Merge branch 'stable' into next-minor 2022-07-24 21:21:37 +01:00
Dylan K. Taylor
5d9f783037 InGamePacketHandler: do not update player rotation if it didn't change
setRotation() does an alarmingly large amount of work...
2022-07-24 21:07:35 +01:00
Dylan K. Taylor
01ca14c314 InGamePacketHandler: avoid processing movement if position is unchanged since last tick 2022-07-24 21:00:12 +01:00
Dylan K. Taylor
c26631d06d InGamePacketHandler: avoid useless object allocations when forceMoveSync=false (99.9% of the time) 2022-07-24 20:44:27 +01:00
Dylan K. Taylor
b75bc61a64 InGamePacketHandler: don't bother checking for flag changes if the flag fields are identical
we don't need to check this on a bit by bit level if the integers are the same.

this saves 2-3 microseconds per packet on my machine, which doesn't sound like much, but it adds up when there are lots of players.
2022-07-24 20:35:49 +01:00
Dylan K. Taylor
3724479be3 InGamePacketHandler: improve performance of input flag resolving 2022-07-24 20:33:35 +01:00
Dylan K. Taylor
e00f8e3a32 Merge branch 'stable' into next-minor 2022-07-14 20:59:06 +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
c7133bc2e6 InGamePacketHandler: don't kick the player out of inventory windows on actor events
this is sent when the player crafts something using an anvil.
2022-07-14 20:36:11 +01:00
Dylan K. Taylor
06655bee78 Updated to 1.19.10 2022-07-13 00:59:49 +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
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