Release 4.0.0-BETA9

This commit is contained in:
Dylan K. Taylor 2021-11-02 19:14:12 +00:00
parent 9f64bc8180
commit 4ca7c29cde
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 75 additions and 1 deletions

View File

@ -1527,3 +1527,77 @@ Released 29th October 2021.
- All parameters are now mandatory.
- Reverted addition of chunk modification counters in previous beta.
- `Chunk::DIRTY_FLAG_TERRAIN` has been renamed to `Chunk::DIRTY_FLAG_BLOCKS`.
# 4.0.0-BETA9
Released 2nd November 2021.
## General
- Now analysed using level 9 on PHPStan 1.0.0.
- `ext-pthreads` v4.0.0 or newer is now required.
- `resources/vanilla` submodule has been removed. BedrockData is now included via Composer dependency [`pocketmine/bedrock-data`](https://packagist.org/packages/pocketmine/bedrock-data).
- `pocketmine/spl` Composer dependency has been dropped.
- The following Composer dependency versions are now required:
- [`pocketmine/bedrock-protocol` v5.0.0](https://github.com/pmmp/BedrockProtocol/tree/5.0.0+bedrock-1.17.40) features substantial changes to its API compared to 3.0.1, which was used in 4.0.0-BETA8. Please see its [release notes](https://github.com/pmmp/BedrockData/releases/tag/5.0.0+bedrock-1.17.40).
- [`pocketmine/log` v0.4.0](https://github.com/pmmp/Log/tree/0.4.0) removes the `LoggerAttachment` interface and replaces logger attachment objects with closures.
- [`pocketmine/log-pthreads` v0.4.0](https://github.com/pmmp/LogPthreads/tree/0.4.0)
- [`pocketmine/classloader` v0.2.0](https://github.com/pmmp/ClassLoader/tree/0.2.0)
- A noisy debug message in `World->updateAllLight()` has been removed.
## API
### Entity
- `Human->setLifetimeTotalXp()` now limits the maximum value to 2^31.
### Event
- `BlockGrowEvent` is now called when cocoa pods grow.
### Item
- Added `Releasable->canStartUsingItem()`.
### Network
- Added `NetworkInterfaceStartException`, which may be thrown by `Network->registerInterface()` and `NetworkInterface->start()`.
### Player
- `SurvivalBlockBreakHandler::createIfNecessary()` has been removed.
- `SurvivalBlockBreakHandler->__construct()` is now public.
- `UsedChunkStatus::REQUESTED()` has been renamed to `REQUESTED_SENDING`.
- `UsedChunkStatus::REQUESTED_GENERATION()` has been added.
### Utils
- `Promise` API has changed:
- Promise-related classes have been moved to `pocketmine\promise` namespace.
- It's now split into `Promise` and `PromiseResolver`.
- `PromiseResolver` provides only `resolve()` and `reject()`. It should be used by callbacks to resolve a promise.
- `Promise` now provides only `onCompletion()` and `isResolved()` APIs. This should be given to consumers to allow them to handle the result of the async operation.
- `PromiseResolver` must not be created directly. Use `new PromiseResolver` and `PromiseResolver->getPromise()`.
### World
- Improved performance of `setBlock()` by around 35% when the `$update` parameter is set to `true`.
- Improved performance of `setBlock()` by around 30% when the `$update` parameter is set to `false`.
- `World->generateChunkCallback()` is no longer exposed to public API.
- `World->getAdjacentChunks()` now returns an array indexed using `World::chunkHash()`, where the `x` and `z` components are the relative offsets from the target chunk (range -1 to +1).
- `World->lockChunk()` now requires `ChunkLockId $lockId` parameter.
- `World->unlockChunk()` now requires a `?ChunkLockId $lockId` parameter. If a non-null lockID is given, the lock on the chunk will only be removed if it matches the given lockID.
- `World->unlockChunk()` now returns `bool` instead of `void` (to signal whether unlocking succeded or not).
- Added `ChunkLockId` class.
## Fixes
### World
- Fixed server crash when tiles with colliding positions are loaded from saved data. Now, an error is logged, but the server won't crash.
- Fixed server crash when liquids and other items flow into terrain locked for population. Now, an advisory locking mechanism is used, and population results will be discarded and recalculated if modifications are detected.
- Fixed various crashes that could occur if a chunk was flagged with `setPopulated(true)` after a promise had already been created for its population.
- Fixed `AssumptionFailedError` in `PopulationTask` when workers previously used for generation are shutdown, and then restarted on the fly by a generation request.
- Fixed assertion failure in `World->drainPopulationRequestQueue()` when requesting, cancelling and then re-requesting generation of a chunk while the generator was busy.
- Fixed generation potentially getting stuck if a population request was cancelled while the population task was running (failure to remove locks from used chunks).
- Fixed `World->requestChunkPopulation()` not taking into account that the target chunk may already be populated. This caused a variety of strange bugs and performance issues.
- Fixed potential memory leak caused by `World->unregisterChunkListenerFromAll()` not taking players into account.
- Fixed debug spam of `chunk has no loaders registered` messages during chunk generation.
### Other fixes
- Fixed server crash when unable to bind to the desired port. Now, the server will show an error and gracefully stop without a crashdump instead.
- Fixed server crash in `Player->showPlayer()` when the target is not in the same world.
- Fixed players, who died in hardcore mode and were unbanned, getting re-banned on next server join.
- Fixed cake block desync when attempting to eat in creative (eating in creative is not yet supported, but the block rollback was missing).
- Fixed players being able to eat items more quickly by dropping them while eating.
- Fixed arrows getting added to creative players' inventories when picked up.
- Fixed players re-requesting the same ungenerated chunks multiple times before they were sent.
- Fixed commands not working in some cases after using some control sequences on the console.

View File

@ -30,7 +30,7 @@ use function str_repeat;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "4.0.0-BETA9";
public const IS_DEVELOPMENT_BUILD = true;
public const IS_DEVELOPMENT_BUILD = false;
public const BUILD_NUMBER = 0;
public const BUILD_CHANNEL = "beta";