Skip to content

Commit 26f1a27

Browse files
authored
Merge branch 'minor-next' into creativeDrop
2 parents dd990e7 + 371eccd commit 26f1a27

File tree

57 files changed

+1694
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1694
-378
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT
5454

5555
- name: Build image for tag
56-
uses: docker/build-push-action@v5.2.0
56+
uses: docker/build-push-action@v5.3.0
5757
with:
5858
push: true
5959
context: ./pocketmine-mp
@@ -66,7 +66,7 @@ jobs:
6666
6767
- name: Build image for major tag
6868
if: steps.channel.outputs.CHANNEL == 'stable'
69-
uses: docker/build-push-action@v5.2.0
69+
uses: docker/build-push-action@v5.3.0
7070
with:
7171
push: true
7272
context: ./pocketmine-mp
@@ -79,7 +79,7 @@ jobs:
7979
8080
- name: Build image for minor tag
8181
if: steps.channel.outputs.CHANNEL == 'stable'
82-
uses: docker/build-push-action@v5.2.0
82+
uses: docker/build-push-action@v5.3.0
8383
with:
8484
push: true
8585
context: ./pocketmine-mp
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Build image for latest tag
9494
if: steps.channel.outputs.CHANNEL == 'stable'
95-
uses: docker/build-push-action@v5.2.0
95+
uses: docker/build-push-action@v5.3.0
9696
with:
9797
push: true
9898
context: ./pocketmine-mp

.github/workflows/discord-release-notify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Setup PHP and tools
16-
uses: shivammathur/[email protected].0
16+
uses: shivammathur/[email protected].4
1717
with:
1818
php-version: 8.2
1919

.github/workflows/draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
submodules: true
2121

2222
- name: Setup PHP
23-
uses: shivammathur/[email protected].0
23+
uses: shivammathur/[email protected].4
2424
with:
2525
php-version: ${{ matrix.php-version }}
2626

.github/workflows/main-php-matrix.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,8 @@ jobs:
147147
- name: Install Composer dependencies
148148
run: composer install --no-dev --prefer-dist --no-interaction
149149

150-
- name: Regenerate registry annotations
151-
run: php build/generate-registry-annotations.php src
152-
153-
- name: Regenerate KnownTranslation APIs
154-
run: php build/generate-known-translation-apis.php
155-
156-
- name: Regenerate BedrockData available files constants
157-
run: php build/generate-bedrockdata-path-consts.php
158-
159-
- name: Regenerate YmlServerProperties constants
160-
run: php build/generate-pocketmine-yml-property-consts.php
150+
- name: Update generated code
151+
run: composer update-codegen
161152

162153
- name: Verify code is unchanged
163154
run: |

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929

3030
- name: Setup PHP and tools
31-
uses: shivammathur/[email protected].0
31+
uses: shivammathur/[email protected].4
3232
with:
3333
php-version: 8.2
3434
tools: php-cs-fixer:3.49

build/generate-block-serializer-consts.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,25 @@ function generateClassHeader(string $className) : string{
102102
return <<<HEADER
103103
<?php
104104
105+
/*
106+
*
107+
* ____ _ _ __ __ _ __ __ ____
108+
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
109+
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
110+
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
111+
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
112+
*
113+
* This program is free software: you can redistribute it and/or modify
114+
* it under the terms of the GNU Lesser General Public License as published by
115+
* the Free Software Foundation, either version 3 of the License, or
116+
* (at your option) any later version.
117+
*
118+
* @author PocketMine Team
119+
* @link http://www.pocketmine.net/
120+
*
121+
*
122+
*/
123+
105124
declare(strict_types=1);
106125
107126
namespace $namespace;

build/generate-item-type-names.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,25 @@ function generateItemIds(ItemTypeDictionary $dictionary, BlockItemIdMap $blockIt
6161
fwrite($file, <<<'HEADER'
6262
<?php
6363
64+
/*
65+
*
66+
* ____ _ _ __ __ _ __ __ ____
67+
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
68+
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
69+
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
70+
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
71+
*
72+
* This program is free software: you can redistribute it and/or modify
73+
* it under the terms of the GNU Lesser General Public License as published by
74+
* the Free Software Foundation, either version 3 of the License, or
75+
* (at your option) any later version.
76+
*
77+
* @author PocketMine Team
78+
* @link http://www.pocketmine.net/
79+
*
80+
*
81+
*/
82+
6483
declare(strict_types=1);
6584
6685
namespace pocketmine\data\bedrock\item;

build/php

Submodule php updated from 6f619bf to 084822a

changelogs/5.14.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# 5.14.0
2+
Released 5th April 2024.
3+
4+
**For Minecraft: Bedrock Edition 1.20.70**
5+
6+
This is a minor feature release, including performance improvements, minor gameplay features, new API features, and various internal improvements.
7+
8+
**Plugin compatibility:** Plugins for previous 5.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` or `pocketmine\data` namespace.
9+
Do not update plugin minimum API versions unless you need new features added in this release.
10+
11+
**WARNING: If your plugin uses the `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.**
12+
Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly.
13+
14+
## General
15+
- Added support for a `--no-log-file` command-line option, which disables the creation of a `server.log` file.
16+
- **Use this with caution.** If you don't have another mechanism for collecting logs (e.g. Docker), this may make debugging harder.
17+
- Added support for automatic `server.log` rotation. When the `server.log` exceeds 32 MB, it will be renamed and moved to the `log_archive` folder in the server's data directory.
18+
- Files in the `log_archive` folder can be safely modified or deleted without stopping the server.
19+
- We suggest a cron job or similar to manage old log files (e.g. deleting or compressing them).
20+
- Added a new cache mechanism for `PocketMine-MP.phar`. This has several advantages:
21+
- Caches are now reused by all threads - this significantly reduces `/tmp` usage (previously every thread generated its own cache, wasting lots of space)
22+
- Dead cache files are automatically cleaned up by new servers - this means that a server crash loop won't flood `/tmp` anymore
23+
- `/status` now reports a more accurate number of threads on Windows.
24+
- Large resource packs are now able to be properly downloaded from the server.
25+
- Larger player skin sizes are now accepted by the server.
26+
- Improved logging from world providers to reduce spam when chunks contain invalid data.
27+
- Added more error logging for Anvil, PMAnvil and MCRegion worlds.
28+
- PHP deprecation warnings no longer cause the server to crash. This should make it easier for server owners to update to newer PHP versions.
29+
30+
## Performance
31+
- Improved world loading performance. This was achieved through a combination of changes:
32+
- Improvements to `BlockStateUpgrader` to avoid unnecessary work
33+
- Improvements to `BlockStateUpgradeSchema` to clean up stupid code
34+
- Improvements to `BlockStateReader` unused state handling
35+
- Optimizations to `RegistryTrait` (see below)
36+
- Improved performance of `RegistryTrait::__callStatic()` accessor by introducing a fast-path optimization. Ensure that you access registries with the correct function name case to benefit from this.
37+
- This improves the performance of `VanillaBlocks::WHATEVER()`, `VanillaItems`, etc.
38+
39+
## Tools
40+
- `tools/generate-blockstate-upgrade-schema.php` now supports generating schemas using `flattenedValueRemaps` (described in [BlockStateUpgradeSchema](https://github.com/pmmp/BedrockBlockUpgradeSchema/releases/tag/4.0.0)).
41+
42+
## Gameplay
43+
- Added sounds for armour equipping and unequipping.
44+
- Added sound for picking berries from a sweet berry bush.
45+
46+
## API
47+
### `pocketmine\block\utils`
48+
- The following enum cases have been added:
49+
- `BannerPatternType::GLOBE`
50+
- `BannerPatternType::PIGLIN`
51+
52+
### `pocketmine\event\player`
53+
- The following classes have been added:
54+
- `PlayerResourcePackOfferEvent` - called before the server tells a connecting client which resource packs are available to download - allows customizing the pack list and other options
55+
56+
### `pocketmine\item`
57+
- The following API methods have been added:
58+
- `public ArmorMaterial->getEquipSound() : ?\pocketmine\world\Sound` - returns the sound to play when this armour is equipped or unequipped
59+
- The following API methods have signature changes:
60+
- `ArmorMaterial->__construct()` now accepts an optional `?Sound $equipSound` parameter
61+
62+
### `pocketmine\utils`
63+
- The following API methods have signature changes:
64+
- `MainLogger->__construct()` now accepts `null` for the `$logFile` parameter - this disables the creation of a logger thread and log file
65+
- `MainLogger->__construct()` now accepts an optional `?string $logArchiveDir` parameter. If set, this enables log archiving in the specified directory when the current log file exceeds 32 MB.
66+
67+
## Dependencies
68+
- Now uses [`pocketmine/bedrock-block-upgrade-schema` version 4.0.0](https://github.com/pmmp/BedrockBlockUpgradeSchema/releases/tag/4.0.0).
69+
- Now uses [`pmmp/ext-pmmpthread` version 6.1.0](https://github.com/pmmp/ext-pmmpthread/releases/tag/6.1.0).
70+
- Now uses [`pocketmine/errorhandler` version 0.7.0](https://github.com/pmmp/ErrorHandler/releases/tag/0.7.0).
71+
- Now uses [`pocketmine/raklib` version 1.1.0](https://github.com/pmmp/RakLib/releases/tag/1.1.0).
72+
- Now uses [`pocketmine/raklib-ipc` version 1.0.0](https://github.com/pmmp/RakLibIpc/releases/tag/1.0.0).
73+
74+
## Internals
75+
- (Re)Added support for RakLib packet ACK receipts. This was used to throttle resource pack sending and prevent network overloading.
76+
- Added `NetworkSession->sendDataPacketWithReceipt()` to make use of this feature.
77+
- `PacketSender` now requires an additional `?int $receiptId` parameter.
78+
- `ResourcePackPacketHandler` now uses `sendDataPacketWithReceipt()` to send resource packs, and delays sending the next chunk until the current one is acknowledged.
79+
- `ResourcePackPacketHandler` now accepts resource pack info directly in the constructor, instead of `ResourcePackManager`. This eases the implementation of `PlayerResourcePackOfferEvent`.
80+
- Increased `ZlibCompressor::DEFAULT_MAX_DECOMPRESSION_SIZE` to 8 MB (previously 2 MB). While this weakens server security, it appears to be necessary to deal with extremely bloated Persona skins.
81+
- Increased max split packet parts accepted by `RakLib` to 512 (previously 128). Again, this is necessary to deal with extremely bloated Persona skins.
82+
- Added a new cache mechanism for `PocketMine-MP.phar`.
83+
- `ext-phar`'s default mechanism is extremely wasteful (generating a separate cache file per thread), and doesn't clean up after itself.
84+
- The new cache mechanism is shared between all threads, and automatically cleans up stale caches.
85+
- The phar stub (`build/server-phar-stub.php`) now converts the phar contents into a `.tar`, and decompresses all the files into `$TMPDIR/PocketMine-MP-phar-cache.<random>/`.
86+
- `phar://` URIs still work with this system, but `new Phar(__FILE__)` must be replaced by `new PharData(__FILE__)` within PocketMine-MP core code.
87+
- Backtraces from a `phar`'d server will now point to a location in the extracted phar cache, rather than the phar itself.
88+
- `block_factory_consistency_check` test (actually for `RuntimeBlockStateRegistry`) now stores less data, and is no longer affected by changes to internal state ID construction.
89+
90+
# 5.14.1
91+
Released 5th April 2024.
92+
93+
## Fixes
94+
- Fixed incorrect `pmmpthread` version check in server bootstrap.

changelogs/5.15.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 5.15.0
2+
Released 25th April 2024.
3+
4+
**For Minecraft: Bedrock Edition 1.20.80**
5+
6+
This is a support release for Minecraft: Bedrock Edition 1.20.80.
7+
8+
**Plugin compatibility:** Plugins for previous 5.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` or `pocketmine\data` namespace.
9+
Do not update plugin minimum API versions unless you need new features added in this release.
10+
11+
**WARNING: If your plugin uses the `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.**
12+
Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly.
13+
14+
## General
15+
- Added support for Minecraft: Bedrock Edition 1.20.80.
16+
- Removed support for earlier versions.

0 commit comments

Comments
 (0)