12503 Commits

Author SHA1 Message Date
Jack Honour
58e1e7bd6f
Worker: fixed missing AsyncTask import for documentation (#4719)
OCD from f5c9c02e09f54b53ed4c495c8a0000b54930ccef
2022-01-10 15:12:37 +00:00
Dylan K. Taylor
0a5b146189
substr() returns an empty string instead of false in 8.0
an empty string will pass through preg_match_all() without any harmful effects, so we don't need to check for it.
2022-01-07 22:38:00 +00:00
Dylan K. Taylor
6d249026cc
Merge branch 'legacy/pm3' into stable 2022-01-07 20:15:15 +00:00
Dylan K. Taylor
ed2145b6a4
php-cs-fixer: enforce EOF newlines 2022-01-07 20:12:21 +00:00
Dylan K. Taylor
35f205b476
4.0.6 is next 2022-01-04 20:51:37 +00:00
Dylan K. Taylor
e7d17eb4d3
Release 4.0.5 2022-01-04 20:51:36 +00:00
Dylan K. Taylor
e8893dd91f
3.26.6 is next 2022-01-04 20:47:31 +00:00
Dylan K. Taylor
a4af1609ea
Release 3.26.5 2022-01-04 20:47:31 +00:00
Dylan K. Taylor
8c4b8a9042
CS 2022-01-04 20:44:10 +00:00
Dylan T
6492cac5c1
Merge pull request from GHSA-c6fg-99pr-25m9 2022-01-04 20:40:55 +00:00
Dylan T
958a9dbf0f
Merge pull request from GHSA-c6fg-99pr-25m9
* Skin: impose length limits on skinID, geometryName and geometryData fields

* Skin: remove extra newline
2022-01-04 20:40:55 +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 T
68f3399cfd
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
Covered123
aeab19a616
Fixed world spawn point not updating to players (#4699)
closes #4383
2022-01-04 20:31:27 +00:00
Dylan K. Taylor
0d595e4324
Update Language dependency 2022-01-04 00:47:04 +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
Dylan K. Taylor
decd1da2d0
BaseSign: remove dead TODO comment 2022-01-03 19:33:03 +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
f62cfe8ae3
4.0.5 is next 2022-01-01 16:50:03 +00:00
Dylan K. Taylor
b903e90dc2
Release 4.0.4 2022-01-01 16:50:02 +00:00
Dylan K. Taylor
c8247786d7
Player: check chat length check with strlen() before mb_strlen()
mb_strlen() is O(n), whereas strlen() is O(1). If we receive very large chat messages (e.g. 2 MB), mb_strlen() will take a very long time to return a result (around 8ms on my machine).
Since the max size of a UTF-8 character is 4 bytes (according to standard), we can use strlen() with 4x the char limit to gate it and prevent this from happening.
2022-01-01 16:46:00 +00:00
Dylan T
f486b5f4a7
Player: fixed fall damage when sprinting down stairs (#4685)
Due to the way positions are updated over the network, we only see the end result of a movement and not its preceding actions. In addition, we don't know for sure whether the MCPE collision checks work the same exact way as PM.

TL;DR: It's possible for the client to capture and send a movement frame after they collided with a step and then already moved forward from it some distance, resulting in a weird arc pattern.

This PR checks the range between the old and new positions for collision boxes to ensure that all possible areas are checked for detecting fall damage.

This has been tested and successfully resolves various issues involving running down stairs:
- missing sounds
- random fall damage
2022-01-01 15:41:19 +00:00
Dylan K. Taylor
54d6b83fc2
Entity: pass the appropriate value for AFFECTED_BY_GRAVITY 2022-01-01 15:39:46 +00:00
Dylan K. Taylor
eedea38669
Improve performance of loading player inventories 2022-01-01 15:26:42 +00:00
Dylan K. Taylor
3c6146b5e0
ContainerTrait: avoid absurdly inefficient use of setItem()
this substantially improves the performance of loading containers such as chests.
2022-01-01 15:05:32 +00:00
Dylan K. Taylor
72f2c794ab
SimpleInventory: improved performance of setContents()
avoid the overhead incurred by clear() and setItem(), because in internalSetContents(), we already have no listeners or viewers to talk to anyway, so this is just spamming shit into /dev/null.
2021-12-31 18:32:19 +00:00
Dylan K. Taylor
38b6b39cb3
Filesystem: workaround a stupid Windows issue in safeFilePutContents()
occasionally Windows will randomly decide to deny us access to rename the file for no reason whatsoever. If this happens, we attempt an old-style copy and delete.
If the rename failed for a legit reason, the copy and delete should also fail and generate an error message. If it was Windows being a spaz, it should work normally without errors.
2021-12-29 15:26:34 +00:00
Dylan K. Taylor
4aab0565c0
ChunkCache: fixed corner case in cache restart on AsyncTask error
the cache may have been destroyed since the task inception, leading to an exception being thrown.
2021-12-27 18:11:55 +00:00
Dylan K. Taylor
8943d8a2a7
Player: fixed maximum message size limits to match vanilla bugrock 2021-12-27 16:51:47 +00:00
Matt
091673d8f1
Fixed "You can only sleep at night" message (#4671) 2021-12-23 23:52:07 +00:00
Dylan K. Taylor
e3614d1a82
Entity: fixed game performance issue with large scale entities
this->size refers to the scaled height, but the client wants the base (unscaled) size in these properties.
This caused immense lag when, for example, setting the scale of a player to 10, because their collision box would become 180 by 60, instead of the expected 18 by 6.
2021-12-18 22:38:45 +00:00
Alexey
93caf72f34
KickCommand: Add missing space
closes #4660
closes #4661
2021-12-17 21:09:14 +00:00
Dylan K. Taylor
e6e1bca676
4.0.4 is next 2021-12-16 01:35:43 +00:00
Dylan K. Taylor
795ebd1824
Release 4.0.3 2021-12-16 01:35:42 +00:00
Dylan K. Taylor
9979a64ad2
3.26.5 is next 2021-12-16 01:23:22 +00:00
Dylan K. Taylor
75a72786f9
Release 3.26.4 2021-12-16 01:23:21 +00:00
Dylan K. Taylor
57e1509c3a
Updated translation APIs 2021-12-15 03:24:13 +00:00
Dylan K. Taylor
4d37b79ff7
Server: fixed not being able to deop players whose names were added to ops.txt with uppercase letters in them
same as iTXTech/Genisys#1204

why didn't anyone report this???
2021-12-15 01:08:59 +00:00
Dylan K. Taylor
ea1fceece2
Merge branch 'legacy/pm3' into stable 2021-12-14 23:15:53 +00:00
Dylan K. Taylor
7fb1669c6d
php-cs-fixer: added binary_operator_spaces and unary_operator_spaces rules 2021-12-14 23:14:39 +00:00
Dylan K. Taylor
45c4a9673d
Player: fixed arm swing animation not showing during attack cooldown of victim
closes #4650
2021-12-14 19:03:42 +00:00
Dylan K. Taylor
4ad8cb02a5
BlockIdentifier: ensure that the tile class given is valid 2021-12-14 17:36:25 +00:00
Dylan K. Taylor
c334e6dec7
Updated locale-data dependency 2021-12-14 00:31:44 +00:00
Dylan K. Taylor
f5bbd30dbb
Fixed skins appearing black when using RTX resource packs, closes #4537 2021-12-13 12:35:55 +00:00
Dylan K. Taylor
3be8472ae2
MemoryManager: fixed dumping of uninitialized properties
closes #4643
2021-12-13 12:11:49 +00:00
Dylan K. Taylor
22bb1ce8e0
4.0.3 is next 2021-12-12 23:27:54 +00:00
Dylan K. Taylor
178dcb71a9
Release 4.0.2 2021-12-12 23:27:50 +00:00
Dylan K. Taylor
0a58fd5472
GeneratorManager: fixed addGenerator() being case-sensitive when overwrite=true
this was caused by 083a1e1ff6b6ff5c0c1ba14250d2b026af103b90.

This was discovered by a new PHPStan rule I'm working on, which disallows overwriting the values of parameter variables. During the refactor of this function to correct the error, another error appeared: Variable might not be defined.

This is yet another excellent example of why mutability is bad.
2021-12-12 21:58:07 +00:00
Dylan K. Taylor
e06eefeab0
build/generate-known-translation-apis: fixed incorrect positional parameter order
closes #4639
2021-12-11 21:28:52 +00:00
Dylan K. Taylor
ede07c4314
Mark KnownTranslationKeys and KnownTranslationFactory as @internal 2021-12-11 21:24:18 +00:00