mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2024-11-24 06:16:13 +00:00
132 lines
7.7 KiB
Markdown
132 lines
7.7 KiB
Markdown
**For Minecraft: Bedrock Edition 1.14.60**
|
|
|
|
This is a feature release, containing various minor API additions, deprecations and a few minor features.
|
|
|
|
### Note about API versions
|
|
Plugins which don't touch the protocol and compatible with any previous 3.x.y version will also run on these releases and do not need API bumps.
|
|
Plugin developers should **only** update their required API to this version if you need the changes in this build.
|
|
|
|
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
|
|
|
# 3.13.0
|
|
## Core
|
|
- PHP 7.3.0 or newer is now required.
|
|
- Player movement processing has been revamped. It's now more tolerant of network lag and doesn't have as many problems with falling.
|
|
|
|
## User Interface
|
|
- `/time` now supports additional aliases `noon`, `sunset`, `midnight` and `sunrise`.
|
|
- Removed warnings when a plugin registers a handler for a deprecated event. Since this warning is developer-focused, and too specific to be useful, it just caused annoyance and confusion to users who didn't know what it meant.
|
|
|
|
## API
|
|
### General
|
|
- It's now possible to require a specific operating system using the `os` directive in `plugin.yml`. More information about this directive can be found in the [developer documentation](https://github.com/pmmp/DeveloperDocs).
|
|
|
|
### Player
|
|
- `Player->resetItemCooldown()` now accepts a second parameter, allowing plugins to provide a custom duration.
|
|
- The following methods have been deprecated and have recommended replacements:
|
|
- `Player->addTitle()` -> `Player->sendTitle()`
|
|
- `Player->addSubTitle()` -> `Player->sendSubTitle()`
|
|
- `Player->addActionBarMessage()` -> `Player->sendActionBarMessage()`
|
|
|
|
### Event
|
|
- The following methods have been deprecated:
|
|
- `EntityDespawnEvent->getType()`
|
|
- `EntityDespawnEvent->getPosition()`
|
|
- `EntityDespawnEvent->isCreature()`
|
|
- `EntityDespawnEvent->isHuman()`
|
|
- `EntityDespawnEvent->isProjectile()`
|
|
- `EntityDespawnEvent->isVehicle()`
|
|
- `EntityDespawnEvent->isItem()`
|
|
- `EntitySpawnEvent->getType()`
|
|
- `EntitySpawnEvent->getPosition()`
|
|
- `EntitySpawnEvent->isCreature()`
|
|
- `EntitySpawnEvent->isHuman()`
|
|
- `EntitySpawnEvent->isProjectile()`
|
|
- `EntitySpawnEvent->isVehicle()`
|
|
- `EntitySpawnEvent->isItem()`
|
|
- Added the following API methods:
|
|
- `EntityDeathEvent->getXpDropAmount()`
|
|
- `EntityDeathEvent->setXpDropAmount()`
|
|
- `PlayerDeathEvent::__construct()` now accepts a fourth (optional) parameter `int $xp`.
|
|
- `EntityDeathEvent::__construct()` now accepts a third (optional) parameter `int $xp`.
|
|
|
|
### Inventory
|
|
- The following classes have been deprecated:
|
|
- `Recipe`
|
|
- The following methods have been deprecated:
|
|
- `CraftingManager->registerRecipe()`
|
|
- `Recipe->registerToCraftingManager()` (and all its implementations)
|
|
|
|
### Item
|
|
- New `Enchantment` type ID constants have been added.
|
|
- `ItemFactory::fromStringSingle()` has been added. This works exactly the same as `ItemFactory::fromString()`, but it has a return type of `Item` instead of `Item|Item[]` (more static analysis friendly).
|
|
|
|
### Level
|
|
- Added the following API methods:
|
|
- `Position->getLevelNonNull()`: this is the same as `Position->getLevel()`, but throws an `AssumptionFailedError` if the level is null or invalid (more static analysis friendly).
|
|
- `Level->getTimeOfDay()`
|
|
- The following constants have been changed:
|
|
- `Level::TIME_DAY` now has a value of `1000`
|
|
- `Level::TIME_NIGHT` now has a value of `13000`
|
|
- Added the following constants:
|
|
- `Level::TIME_MIDNIGHT`
|
|
- `Level::TIME_NOON`
|
|
- The following types of particles now accept optional `Color` parameters in the constructor:
|
|
- `EnchantParticle`
|
|
- `InstantEnchantParticle`
|
|
|
|
### Network
|
|
- Added the following API methods:
|
|
- `RakLibInterface->setPacketLimit()`
|
|
|
|
### Scheduler
|
|
AsyncTask thread-local storage has been improved, making it simpler and easier to use.
|
|
- `AsyncTask->fetchLocal()` no longer deletes stored thread-local data. Instead, the storage behaves more like properties, and gets deleted when the AsyncTask object goes out of scope.
|
|
- `AsyncTask->peekLocal()` has been `@deprecated` (use `fetchLocal()` instead).
|
|
- Notices are no longer emitted if an async task doesn't fetch its locally stored data.
|
|
- The following methods have been deprecated:
|
|
- `AsyncTask->getFromThreadStore()` (use its worker's corresponding method)
|
|
- `AsyncTask->saveToThreadStore()` (use its worker's corresponding method)
|
|
- `AsyncTask->removeFromThreadStore()` (use its worker's corresponding method)
|
|
|
|
### Utils
|
|
- The following functions have been deprecated and have recommended replacements:
|
|
- `Utils::getMemoryUsage()` -> split into `Process::getMemoryUsage()` and `Process::getAdvancedMemoryUsage()` (not 1:1 replacement!!)
|
|
- `Utils::getRealMemoryUsage()` -> `Process::getRealMemoryUsage()`
|
|
- `Utils::getThreadCount()` -> `Process::getThreadCount()`
|
|
- `Utils::kill()` -> `Process::kill()`
|
|
- `Utils::execute()` -> `Process::execute()`
|
|
- Added the following constants:
|
|
- `Utils::OS_WINDOWS`
|
|
- `Utils::OS_IOS`
|
|
- `Utils::OS_MACOS`
|
|
- `Utils::OS_ANDROID`
|
|
- `Utils::OS_LINUX`
|
|
- `Utils::OS_BSD`
|
|
- `Utils::OS_UNKNOWN`
|
|
- Added the following API methods:
|
|
- `Config->getPath()`
|
|
- `Utils::recursiveUnlink()`
|
|
- `Terminal::write()`
|
|
- `Terminal::writeLine()`
|
|
|
|
# 3.13.1
|
|
- Fixed issues with `server.lock` not being unlocked on some platforms. Now, the server explicitly releases it before exiting.
|
|
- `/timings` now sends a usage message when using an unknown subcommand. Previously, it would just give no output.
|
|
- `/whitelist` now sends a usage message when using an unknown subcommand. Previously, it would just give no output.
|
|
- The output from `/timings` is now broadcasted on the `pocketmine.broadcast.admin` broadcast channel for auditability, similarly to other operator commands.
|
|
- Fixed `ShapedRecipe` deprecation warning on PHP 7.4.
|
|
- Fixed some potential crashes with Bedrock worlds when chunk data is corrupted or missing.
|
|
- Fixed a bug in region handling that caused region loaders to overestimate the amount of space used in the file. This resulted in an up to 4 MB growth of the file size every time the region was reloaded after writing a chunk.
|
|
- Region handlers now try to reuse free space in region files before putting the chunk at the end of the file. Previously, space was only reused if the new version of the chunk was <= the size of the old. This fixes endless growth of region files.
|
|
- Regions now never directly overwrite old copies of chunks when saving; instead they try to find an alternative location (preferring unused space within the file first). This avoids chunk corruption on power failure (the old copy of the chunk won't be damaged, so a rollback might occur instead), and as happy side effect, causes oversized regions to gradually shrink towards their most packed state over time, saving disk space.
|
|
- Regions now have a hard size cap at 64 GB. This is because the header pointers will overflow beyond 64 GB (besides, a normal region shouldn't be this big anyway).
|
|
- Fixed a crash that could occur when reading a too-short region header.
|
|
- `VerifyLoginTask` now only copies JWTs to verify instead of the entire login packet. This reduces the amount of data copied between threads, improving performance.
|
|
- Added a fast-fail check to `VerifyLoginTask` by checking the JWT header's `x5u` against the expected public key.
|
|
- `Skin->validate()` now throws `InvalidSkinException` instead of `\InvalidArgumentException`.
|
|
- A debug message is now logged when a player is kicked for having an invalid skin, giving a brief line of detail why.
|
|
- Fixed players not being kicked for having an invalid `resourcePatch`.
|
|
- Fixed block meta value of cake being preserved when using pick-block.
|
|
- Fixed explosions not fully destroying multi-block objects like beds and doors.
|