Commit Graph

12693 Commits

Author SHA1 Message Date
Dylan K. Taylor
c221484fc3 fixed CS 2022-01-15 22:27:06 +00:00
Dylan K. Taylor
d9deb571ed Added LecternPlaceBookSound 2022-01-15 22:26:56 +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
6679c53e56 BrewingStand: fixed collision box 2022-01-15 16:41:27 +00:00
Dylan K. Taylor
ee6548aa50 Merge branch 'stable' into next-minor 2022-01-14 00:45:49 +00:00
Dylan K. Taylor
9d061e86af 4.0.7 is next 2022-01-13 21:46:30 +00:00
Dylan K. Taylor
f7d25f251e Release 4.0.6 2022-01-13 21:46:30 +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
Jack Honour
58e1e7bd6f Worker: fixed missing AsyncTask import for documentation (#4719)
OCD from f5c9c02e09
2022-01-10 15:12:37 +00:00
Dylan K. Taylor
a5c0958adf Filesystem::safeFilePutContents() now consistently throws RuntimeException in all expected failure cases
unexpected cases may still throw ErrorException (such as undefined variables) but we don't want to capture those.
2022-01-09 16:33:31 +00:00
Dylan K. Taylor
fd880d8465 Filesystem: Use ErrorToExceptionHandler to improve error output 2022-01-09 16:26:42 +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
51f2a78dcf World: break random tick blocks initializing out of constructor
and fix a variable clobber by foreach as a side effect
2022-01-07 21:36:49 +00:00
Dylan K. Taylor
5128bc02bb Reduce code duplication between BaseCoral and CoralBlock 2022-01-07 21:32:44 +00:00
Dylan K. Taylor
4f4aa62479 ConcretePowder: call BlockFormEvent when coming in contact with water 2022-01-07 21:19:08 +00:00
Dylan K. Taylor
c267e7b3c2 Call BlockMeltEvent when frosted ice melts 2022-01-07 21:15:05 +00:00
Dylan K. Taylor
3faeb5a556 disable-block-ticking directive now supports names a la /give 2022-01-07 21:06:06 +00:00
Dylan K. Taylor
0bc578b8fc Block: added getTypeId() 2022-01-07 21:03:19 +00:00
Dylan K. Taylor
661848c5e7 fix more EOF newlines 2022-01-07 20:39:43 +00:00
Dylan K. Taylor
75fc7a2d1f Merge branch 'stable' into next-minor 2022-01-07 20:16:35 +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
4f8a0bad25 RegistryTrait: avoid overwriting parameter variables 2022-01-06 23:54:54 +00:00
Dylan K. Taylor
fb29653ed7 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-06 22:43:57 +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
8532e9c8e0 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-04 14:38:15 +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
e04dfe96af Merge branch 'stable' into next-minor 2022-01-01 17:55:17 +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
xxAROX
193a1b3f4e TextFormat: Added MINECOIN_GOLD (§g) color code support (#4670) 2021-12-30 23:53:05 +00:00