Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 91370f7

Browse files
committed
Merge branch 'pmmp-stable' into stable
2 parents 6f4026a + d0da371 commit 91370f7

Some content is hidden

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

58 files changed

+694
-275
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup PHP and tools
1616
uses: shivammathur/setup-php@2.28.0
1717
with:
18-
php-version: 8.1
18+
php-version: 8.2
1919

2020
- name: Restore Composer package cache
2121
uses: actions/cache@v3

.github/workflows/draft-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php-version: [8.1]
15+
php-version: [8.2]
1616

1717
steps:
1818
- uses: actions/checkout@v4
@@ -78,7 +78,7 @@ jobs:
7878
> build_info.json
7979
8080
- name: Upload release artifacts
81-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
8282
with:
8383
name: release_artifacts
8484
path: |

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
- name: Setup PHP and tools
1919
uses: shivammathur/setup-php@2.28.0
2020
with:
21-
php-version: 8.1
22-
tools: php-cs-fixer:3.17
21+
php-version: 8.2
22+
tools: php-cs-fixer:3.38
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Pre-requisites
33
- A bash shell (git bash is sufficient for Windows)
44
- [`git`](https://git-scm.com) available in your shell
5-
- PHP 8.1 or newer available in your shell
5+
- PHP 8.2 or newer available in your shell
66
- [`composer`](https://getcomposer.org) available in your shell
77

88
## Custom PHP binaries

build/php

Submodule php updated from b0ffbdb to 73e5950

changelogs/5.10.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# 5.10.0
2+
Released 14th December 2023.
3+
4+
**For Minecraft: Bedrock Edition 1.20.50**
5+
6+
This is a minor feature release, including new gameplay features and minor performance 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+
- PHP 8.2 is now used by default. PHP 8.1 is still supported, but will be removed in a future 5.x release.
16+
- Improved timings reports by removing `Breakdown` timings group. This group serves no purpose with tree timings and made for confusing reading.
17+
18+
## Performance
19+
- Improved performance of `Block::encodeFullState()` in most conditions. This in turn improves performance of `World::setBlock()` and `World::setBlockAt()`.
20+
- Improved network compression performance by avoiding unnecessary object allocations.
21+
- Timings now report time spent in individual `Snooze` handlers, making it easier to debug performance issues.
22+
23+
## Gameplay
24+
### Blocks
25+
- Implemented crop growth speed modifiers.
26+
- The following things now positively affect crop growth speed:
27+
- Being planted on or being adjacent to farmland (hydrated farmland offers a larger benefit than dry farmland)
28+
- Potential light level of at least 9
29+
- Being planted in rows with space between them (or a different type of crop)
30+
- The following things now negatively affect crop growth speed:
31+
- Improper arrangement (e.g. the same crop on all sides)
32+
- Insufficient light level (below 9)
33+
- Poorly arranged crops will grow slower in this version. Past versions behaved as if crops were always planted in ideal conditions.
34+
- Crops planted in ideal conditions will grow at the same speed as before.
35+
36+
### Items
37+
- Added the following new items:
38+
- All types of Smithing Template
39+
- Pitcher Pod is now correctly registered. In previous versions, it was mapped to the Pitcher Crop block, causing incorrect name display in commands.
40+
41+
## Internals
42+
- Cleaned up various getter usages where direct property access is possible.
43+
- Avoided unnecessary repeated getter calls in some loops.
44+
- `NetworkSession` may now track `string` instead of `CompressBatchPromise` when a batch was synchronously compressed. This significantly reduces object allocations and improves performance.
45+
- `NetworkSession` now sends less information to clients on login validation failure. This avoids leaking potentially sensitive error information to clients.
46+
- Clients can correlate their disconnects with server-side logs using the `Error ID` shown on the disconnect screen.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"require-dev": {
5555
"friendsofphp/php-cs-fixer": "^3.40",
56-
"phpstan/phpstan": "1.10.46",
56+
"phpstan/phpstan": "1.10.50",
5757
"phpstan/phpstan-phpunit": "^1.1.0",
5858
"phpstan/phpstan-strict-rules": "^1.2.0",
5959
"phpunit/phpunit": "^10.5.0"

src/BootstrapOptions.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/*
4+
*
5+
* ____ _ _ __ __ _ __ __ ____
6+
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7+
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8+
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9+
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10+
*
11+
* This program is free software: you can redistribute it and/or modify
12+
* it under the terms of the GNU Lesser General Public License as published by
13+
* the Free Software Foundation, either version 3 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* @author PocketMine Team
17+
* @link http://www.pocketmine.net/
18+
*
19+
*
20+
*/
21+
22+
declare(strict_types=1);
23+
24+
namespace pocketmine;
25+
26+
/**
27+
* Constants for all the command-line options that PocketMine-MP supports.
28+
* Other options not listed here can be used to override server.properties and pocketmine.yml values temporarily.
29+
*
30+
* @internal
31+
*/
32+
final class BootstrapOptions{
33+
34+
private function __construct(){
35+
//NOOP
36+
}
37+
38+
/** Disables the setup wizard on first startup */
39+
public const NO_WIZARD = "no-wizard";
40+
/** Force-disables console text colour and formatting */
41+
public const DISABLE_ANSI = "disable-ansi";
42+
/** Force-enables console text colour and formatting */
43+
public const ENABLE_ANSI = "enable-ansi";
44+
/** Path to look in for plugins */
45+
public const PLUGINS = "plugins";
46+
/** Path to store and load server data */
47+
public const DATA = "data";
48+
}

src/PocketMine.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ function server(){
274274
ErrorToExceptionHandler::set();
275275

276276
$cwd = Utils::assumeNotFalse(realpath(Utils::assumeNotFalse(getcwd())));
277-
$dataPath = getopt_string("data") ?? $cwd;
278-
$pluginPath = getopt_string("plugins") ?? $cwd . DIRECTORY_SEPARATOR . "plugins";
277+
$dataPath = getopt_string(BootstrapOptions::DATA) ?? $cwd;
278+
$pluginPath = getopt_string(BootstrapOptions::PLUGINS) ?? $cwd . DIRECTORY_SEPARATOR . "plugins";
279279
Filesystem::addCleanedPath($pluginPath, Filesystem::CLEAN_PATH_PLUGINS_PREFIX);
280280

281281
if(!@mkdir($dataPath, 0777, true) && !is_dir($dataPath)){
@@ -308,10 +308,10 @@ function server(){
308308
//Logger has a dependency on timezone
309309
Timezone::init();
310310

311-
$opts = getopt("", ["no-wizard", "enable-ansi", "disable-ansi"]);
312-
if(isset($opts["enable-ansi"])){
311+
$opts = getopt("", [BootstrapOptions::NO_WIZARD, BootstrapOptions::ENABLE_ANSI, BootstrapOptions::DISABLE_ANSI]);
312+
if(isset($opts[BootstrapOptions::ENABLE_ANSI])){
313313
Terminal::init(true);
314-
}elseif(isset($opts["disable-ansi"])){
314+
}elseif(isset($opts[BootstrapOptions::DISABLE_ANSI])){
315315
Terminal::init(false);
316316
}else{
317317
Terminal::init();
@@ -324,7 +324,7 @@ function server(){
324324

325325
$exitCode = 0;
326326
do{
327-
if(!file_exists(Path::join($dataPath, "server.properties")) && !isset($opts["no-wizard"])){
327+
if(!file_exists(Path::join($dataPath, "server.properties")) && !isset($opts[BootstrapOptions::NO_WIZARD])){
328328
$installer = new SetupWizard($dataPath);
329329
if(!$installer->run()){
330330
$exitCode = -1;

0 commit comments

Comments
 (0)