17210 Commits

Author SHA1 Message Date
Dylan K. Taylor
8102586ee0
Merge branch 'stable' into minor-next 2023-04-12 21:04:03 +01:00
Dylan K. Taylor
18b528f72d
ItemStackRequestExecutor: fixed borked taking of created items
closes #5695
2023-04-12 21:01:46 +01:00
Dylan K. Taylor
0336394098
Human: remove useless NameTag tag
this is not written anywhere, so this code never does anything.
2023-04-12 16:44:10 +01:00
Dylan K. Taylor
7e92da126d
DelegateInventory: fixed slots being synced twice and breaking ItemStackRequests
the second time the slot is synced, there is no prediction, so the slot update isn't associated with a request anymore. This causes subsequent requests in the same packet to fail, since the dependency request ID isn't associated with the slot anymore.

This change fixes the problem by only allowing the backing inventory to trigger a call to DelegateInventory->on*Change(). While we could have removed and re-added the listener instead, this way is safer since it doesn't assume that the backing inventory won't modify the given item in setItem().

closes #5692
2023-04-12 15:43:51 +01:00
Dylan K. Taylor
b80d7a57e3
Merge branch 'minor-next' into major-next 2023-04-11 23:56:28 +01:00
Dylan K. Taylor
1569bed37a
Merge branch 'stable' into minor-next 2023-04-11 23:56:22 +01:00
Dylan K. Taylor
ba62e0f9cb
WorldManager: fixed borked pre-generation for new worlds' spawn terrain
perhaps directly altering the behaviour of selectChunks() wasn't a good
idea? ...
2023-04-11 23:55:53 +01:00
Dylan K. Taylor
a6e79c5004
TimingsHandler: remove useless paste metadata
these fields are not used by any version of timings, so this code is redundant.
2023-04-11 23:45:01 +01:00
Dylan K. Taylor
858d4a2ed2
changelog: fixed indentation
I have no idea what happened here...
2023-04-11 23:35:14 +01:00
Dylan K. Taylor
18658cb74d
5.0.0-BETA3 is next 2023-04-11 23:27:01 +01:00
Dylan K. Taylor
dd9ea4ee02
Release 5.0.0-BETA2 5.0.0-BETA2 2023-04-11 23:27:01 +01:00
Dylan K. Taylor
ed88d68fd7
Remove stuff deprecated in 4.19.0 2023-04-11 23:20:58 +01:00
Dylan K. Taylor
9bddcc72f7
Merge branch 'minor-next' into major-next 2023-04-11 22:51:50 +01:00
Dylan K. Taylor
87d8c1ea11
4.19.1 is next 2023-04-11 22:48:05 +01:00
Dylan K. Taylor
89deb0fe18
Release 4.19.0 4.19.0 2023-04-11 22:48:02 +01:00
Dylan K. Taylor
ad88490e84
Mark TickingChunkEntry as internal 2023-04-11 22:34:11 +01:00
Dylan K. Taylor
3490e2b06a
Mark RegisteredListenerCache as internal 2023-04-11 22:33:44 +01:00
Dylan T
946c2fbacc
Ticking chunks rewrite (#5689)
This API is much more flexible than the old, allowing any arbitrary set of chunks to be ticked.

These changes also improve the performance of random chunk ticking by almost entirely eliminating the cost of chunk selection. Ticking chunks are now reevaluated when a player moves, instead of every tick.

The system also does not attempt to check the same chunks twice, leading to further improvements.

Overall, the overhead of random chunk selection is reduced anywhere from 80-96%. In practice, this can offer a 5-10% performance gain for servers with sparsely distributed players.
2023-04-11 20:01:19 +01:00
Dylan K. Taylor
1c0eed56f1
Added runtime test for event handler inheritance, to ensure I don't accidentally break it with optimisations 2023-04-11 13:52:37 +01:00
Dylan K. Taylor
a0dadc6e37
Merge branch 'minor-next' into major-next 2023-04-10 14:38:23 +01:00
Dylan K. Taylor
9e9b4db00f
Merge branch 'stable' into minor-next 2023-04-10 14:32:33 +01:00
Dylan K. Taylor
e667b5c7db
4.18.5 is next 2023-04-10 14:17:56 +01:00
Dylan K. Taylor
f61f72180f
Release 4.18.4 4.18.4 2023-04-10 14:17:53 +01:00
Dylan K. Taylor
3f82150837
Update Composer dependencies 2023-04-10 14:06:50 +01:00
Dylan K. Taylor
017fcde6aa
always the CS... 2023-04-10 13:56:53 +01:00
Dylan K. Taylor
24374297e7
NetworkSession: extract rate limiting functionality into its own unit, and apply a separate rate limit to game packets 2023-04-10 13:53:22 +01:00
Dylan K. Taylor
76ebedff6a
HandlerList: remove unnecessary variable 2023-04-07 22:58:30 +01:00
Dylan K. Taylor
3ea8d27a3b
HandlerList: improve listener list development to make way for #5678 2023-04-07 22:55:27 +01:00
Dylan K. Taylor
d6c923b525
ExperienceOrb: add get/setDespawnDelay
closes #5645

the code for this is borrowed from ItemEntity. I didn't feel like a base class was appropriate, and we can't (yet) declare constants in traits.
2023-04-07 22:33:30 +01:00
Dylan K. Taylor
7b55c984bf
InGamePacketHandler: reduce debug noise on outdated movements 2023-04-07 21:40:46 +01:00
Dylan K. Taylor
f5b4d64668
Player: increase max distance between movements to allow high levels of speed to work correctly
speed 255 may allow the player to move as much as 14.8 blocks per tick when sprinting.
2023-04-07 21:35:58 +01:00
Dylan K. Taylor
1683aa681d
TimingsHandler: added format version 2023-04-06 15:08:49 +01:00
Dylan K. Taylor
bf84caa02c
Timings: record peak tick time and active ticks
this information is useful for determining the sizes of lag spikes, and giving more accurate average times.
2023-04-06 15:05:40 +01:00
Dylan K. Taylor
734adec90d
TimingsCommand: log the response body on failed paste 2023-04-06 14:46:02 +01:00
Dylan K. Taylor
4724195791
Improved performance of event calls
This change significantly reduces the amount of work done by event handlers. Instead of traversing all of the priorities and event parent chain multiple times, we reduce event handlers down to a simple list, which doesn't require any logic to iterate over.
Previously, calling an event with lots of parents costed more than an event which directly descended from Event.
In addition, we had to do a lot of usually useless work to check all priorities, when in practice, only NORMAL will be used in almost all cases.

This change makes it more cost effective to implement the feature suggested by #5678; however, it will still require additional changes.
2023-04-05 23:02:44 +01:00
Dylan K. Taylor
f32a853bd4
HandlerList: remove useless isset 2023-04-05 21:37:08 +01:00
Dylan K. Taylor
dbcd2b1e65
ItemTypeIds::toBlockTypeId() now returns null for non-blockitem IDs
closes #5648
2023-04-05 21:04:00 +01:00
Dylan K. Taylor
61b0ad3e7f
PreSpawnPacketHandler: added dedicated timer for the humongous amount of crap that has to be sent pre-spawn 2023-04-05 20:58:49 +01:00
Dylan K. Taylor
b2f755720d
Use a proper Breakdown timing group instead of the unwieldy INCLUDED_BY_OTHER_TIMINGS_PREFIX 2023-04-05 20:47:47 +01:00
Dylan K. Taylor
8ef2780dcd
Use group format for tasks 2023-04-05 20:35:54 +01:00
Dylan K. Taylor
7e1467f3f7
Merge branch 'minor-next' into major-next 2023-04-05 20:14:59 +01:00
Dylan K. Taylor
b19c7212ab
Merge branch 'stable' into minor-next 2023-04-05 20:12:31 +01:00
Dylan K. Taylor
14c1a9550d
Update composer dependencies 2023-04-05 20:12:21 +01:00
Dylan K. Taylor
9037d5f16b
4.18.4 is next 2023-04-05 20:07:38 +01:00
Dylan K. Taylor
8b64ea9e65
Release 4.18.3 4.18.3 2023-04-05 20:07:23 +01:00
Dylan K. Taylor
2936726bf8
Fixed packets sent by EntityEventBroadcaster not firing DataPacketSendEvent
closes #5670

I'm not super happy with this fix, since it can still be broken if StandardPacketBroadcaster is replaced by something else. However, fixing that problem is probably going to require internal BC breaks, which are not suitable for a patch release.
2023-04-03 22:46:14 +01:00
Dylan K. Taylor
9cd07f6721
NetworkBroadcastUtils: remove dead code
we don't allow changing the target list anymore, since it increases internal complexity, so this code is redundant.
2023-04-03 22:37:22 +01:00
Dylan K. Taylor
4bb8daa1a5
ItemStackRequestExecutor: allow any action to take from the created output slot
fixes #5679
2023-04-03 22:24:40 +01:00
Dylan K. Taylor
6e8eda4ac1
Fixed creative inventory items getting modified by ItemStackRequests 2023-04-03 22:22:21 +01:00
Dylan K. Taylor
73522d06ef
... 2023-03-31 21:51:07 +01:00