230 Commits

Author SHA1 Message Date
Dylan K. Taylor
11ef6414b0
Server: remove deprecated method 2023-03-16 13:32:46 +00:00
Dylan K. Taylor
abd4ef01eb
Merge branch 'minor-next' into major-next 2023-03-15 23:02:41 +00:00
Dylan K. Taylor
337a254768
Use NetworkBroadcastUtils for broadcasting packets
this eradicates all but 4 usages of Server in Entity, which is extremely cool.
2023-03-15 22:28:51 +00:00
Dylan K. Taylor
a31e3331fd
Move Server::broadcastPackets() to NetworkBroadcastUtils::broadcastPackets()
this has no business being in Server, and it also doesn't need to be an instance method, since it never uses $this.
2023-03-15 22:25:23 +00:00
Dylan K. Taylor
cc8660629b
First look at shared EntityEventBroadcaster,
this improves performance in PvP servers and other areas where lots of players or entities exist in one space.

fixes #5622
2023-03-15 18:22:56 +00:00
Dylan K. Taylor
e7e19abe85
IPv4 and IPv6 RakLibInterface instances now both use the same broadcaster and context
fixes #5625
2023-03-15 17:17:56 +00:00
Dylan K. Taylor
6db2b022fb
Merge branch 'next-minor' into next-major 2023-03-04 16:58:03 +00:00
Dylan K. Taylor
a523189149
Added separate timings for broadcast and session buffer compression 2023-03-04 16:41:41 +00:00
Dylan K. Taylor
aaec21f544
Compressor: Use minCompressionThreshold exclusively
closes #5589
2023-03-04 15:07:50 +00:00
Dylan K. Taylor
5854b1c8c2
Merge branch 'next-minor' into next-major 2023-02-22 22:51:51 +00:00
Dylan K. Taylor
8234360c8d
Avoid creating batch buffers just to determine whether a batch should be globally compressed
Instead, sum together the lengths of encoded packet buffers and use that to decide whether to build the buffer or not.
2023-02-22 22:43:10 +00:00
Dylan K. Taylor
cfa1e7486a
Move legacy recipes and creative items in-house
having them here allows BedrockData to represent latest versions freely, without being limited by technical limitations of PM4.
2023-02-02 15:25:03 +00:00
Dylan K. Taylor
3a13f5cf5f
Merge branch 'next-minor' into next-major 2023-01-16 19:56:51 +00:00
Dylan K. Taylor
edb8f19a0c
Merge branch 'stable' into next-minor 2023-01-16 19:56:38 +00:00
Dylan K. Taylor
0bb9fb09cc
CS again 2023-01-16 19:39:24 +00:00
Dylan K. Taylor
ab21fcdd67
Server: fixed load statistics not including Snooze processing time
this has been a bug ever since Snooze was first introduced. The load statistic, similarly to timings, did not account for time spent processing notifications between ticks. The problem is that this is often where a significant amoutn of the load actually comes from, because Snooze is most often activated due to incoming packets.

This change fixes the problem by including the time spent processing notifications since the previous tick in the current tick's usage metric.
2023-01-16 19:26:32 +00:00
Dylan K. Taylor
d9b8251f7b
Merge branch 'next-minor' into next-major 2023-01-16 18:31:51 +00:00
Dylan K. Taylor
ad6a423d12
Merge branch 'stable' into next-minor 2023-01-16 18:30:13 +00:00
Dylan K. Taylor
c2c529e2da
Include Snooze interrupts in timings results
fixes #5511

This requires any Timings instances to be updated to
pmmp/timings@5410f62436, otherwise the TPS
reported will be incorrect.
2023-01-16 17:40:39 +00:00
Dylan K. Taylor
c55e23a2c6
Localized disconnect message for spawn selection failure 2023-01-14 20:59:27 +00:00
Dylan K. Taylor
5c2ed210fc
Merge branch 'next-minor' into next-major 2023-01-14 20:53:41 +00:00
Dylan K. Taylor
289e86e899
Make use of World::requestSafeSpawn() 2023-01-14 17:55:00 +00:00
Dylan K. Taylor
8909aa6a18
Merge branch 'next-minor' into next-major 2023-01-13 17:29:25 +00:00
Dylan K. Taylor
dff3f45d22
Constify more tick-related things 2023-01-13 16:29:09 +00:00
Dylan K. Taylor
1e17d86421
Constify server TPS and server tick time
this makes it significantly easier to perform experiments involving the server TPS.
2023-01-13 16:03:15 +00:00
Dylan K. Taylor
7ac6bd79a9
Localized remaining disconnection screens (except one or two that should never actually happen) 2022-12-27 20:05:59 +00:00
Dylan K. Taylor
c89df7eb1c
Merge remote-tracking branch 'origin/next-minor' into next-major 2022-12-25 18:22:13 +00:00
Dylan K. Taylor
0d169b4e80
Filesystem: added fileGetContents to reduce ErrorToExceptionHandler boilerplate code 2022-12-25 17:13:51 +00:00
Dylan K. Taylor
2a81a421f3
Merge branch 'next-minor' into next-major 2022-12-24 17:23:30 +00:00
Dylan K. Taylor
9010b2743c
Move player data storage handling behind an interface 2022-12-23 18:58:49 +00:00
Dylan K. Taylor
6e2685cbbb
Merge branch 'next-minor' into next-major 2022-12-18 22:25:32 +00:00
Dylan K. Taylor
bf44edd179
Constify a bunch of NBT keys, pass 1 2022-12-18 22:12:15 +00:00
Dylan K. Taylor
4d79aced07
Merge branch 'next-minor' into next-major 2022-12-15 19:50:27 +00:00
Dylan K. Taylor
99996b62d6
Align PhpDoc @param tags according to PHP-CS-Fixer 2022-12-06 13:21:20 +00:00
Dylan K. Taylor
fdb07cdbcd
Added more missing native types according to 8.0 standards 2022-11-23 14:21:38 +00:00
Dylan K. Taylor
9f6c6b2b71
Merge branch 'next-minor' into next-major 2022-10-16 16:58:50 +01:00
Dylan K. Taylor
b74c092d9b
Server: removed reference to nonexistent API method 2022-10-15 15:06:43 +01:00
Dylan K. Taylor
53cae8911d
Merge branch 'next-minor' into next-major 2022-10-14 21:53:25 +01:00
Dylan K. Taylor
7bcc663b60
Migrate core code to using symfony/filesystem
webmozart/path-util is retained for plugin compatibility, but is dropped in 5.0
2022-10-14 21:51:29 +01:00
Dylan K. Taylor
b3bda788d9
Server: Deprecated getPlayerByPrefix()
this is only used for commands anyway, but we can't get rid of it yet.
2022-10-14 21:45:09 +01:00
Dylan K. Taylor
2cc8a56e68
Server: fixed borked serverCommand timings 2022-10-14 20:02:44 +01:00
Dylan K. Taylor
774df0fa4c
DataPacketSendEvent: added setPackets()
this is an implicit BC break, since plugins may assume that the packets in this array aren't going to change.
However, in practice, it's not likely to cause any real issues.
2022-10-13 17:06:09 +01:00
Dylan K. Taylor
f88ae93897
BC break: Replaced webmozart/path-util with symfony/filesystem, closes #5332 2022-10-13 16:43:36 +01:00
Dylan K. Taylor
4b41b2f9ae
Merge remote-tracking branch 'origin/next-minor' into next-major 2022-09-28 16:15:35 +01:00
Dylan T
b87e4d8bd3
Introduce and use TextFormat::addBase() (#5268)
This function adds "base" format to a string. The given formats are inserted directly after any RESET code in the sequence.

An example of where this is needed is in the logger.

Without this change, the following code:
$logger->notice("I'm a " . TextFormat::RED . "special" . TextFormat::RESET . " cookie");

causes the "cookie" part of the message to show as grey, instead of the expected aqua for NOTICE level messages.

There are also many workarounds for this problem throughout the server, mostly in command outputs, being forced to use WHITE instead of RESET to avoid breaking the logger output.
2022-09-28 16:13:11 +01:00
Dylan K. Taylor
6f4ea886b0
Merge branch 'next-minor' into next-major 2022-09-28 00:39:00 +01:00
Dylan T
83e5b0adb6
ConsoleCommandSender is no longer responsible for forwarding broadcast messages to the logger (#5311)
This is a step towards implementing #2543.
2022-09-27 20:58:33 +01:00
Dylan K. Taylor
f80ffd8de0
Merge branch 'next-minor' into next-major 2022-09-15 13:59:21 +01:00
Dylan K. Taylor
441b06f6c7
Merge branch 'stable' into next-minor 2022-09-15 12:44:53 +01:00
Dylan K. Taylor
f3ca6de1eb
shut 2022-09-02 20:00:52 +01:00