Skip to content

Commit

Permalink
Release 5.17.0 (1.21.2 support)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanCraft623 authored Jul 10, 2024
2 parents 68d2e29 + 824e270 commit 616f96a
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 9 deletions.
25 changes: 25 additions & 0 deletions changelogs/5.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 5.17.0
Released 10th July 2024.

**For Minecraft: Bedrock Edition 1.21.2**

This is a support release for Minecraft: Bedrock Edition 1.21.2.

**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.
Do not update plugin minimum API versions unless you need new features added in this release.

**WARNING: If your plugin uses the `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.**
Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly.

## General
- Added support for Minecraft: Bedrock Edition 1.21.2.
- Removed support for earlier versions.

## API
### `pocketmine\player`
- The following methods have been added:
- `public function closeAllForms() : void` - closes the current viewing form and forms in queue.

## Fixes
- Bowl can now be used as fuel.
- Bells always drops themselves even when using an incompatible tool.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"pocketmine/bedrock-block-upgrade-schema": "~4.2.0+bedrock-1.21.0",
"pocketmine/bedrock-data": "~2.11.0+bedrock-1.21.0",
"pocketmine/bedrock-item-upgrade-schema": "~1.10.0+bedrock-1.21.0",
"pocketmine/bedrock-protocol": "~31.0.0+bedrock-1.21.0",
"pocketmine/bedrock-protocol": "~32.1.0+bedrock-1.21.2",
"pocketmine/binaryutils": "^0.2.1",
"pocketmine/callback-validator": "^1.0.2",
"pocketmine/color": "^0.3.0",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "5.16.1";
public const BASE_VERSION = "5.17.1";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable";

Expand Down
5 changes: 5 additions & 0 deletions src/network/mcpe/NetworkSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
use pocketmine\network\mcpe\handler\SpawnResponsePacketHandler;
use pocketmine\network\mcpe\protocol\AvailableCommandsPacket;
use pocketmine\network\mcpe\protocol\ChunkRadiusUpdatedPacket;
use pocketmine\network\mcpe\protocol\ClientboundCloseFormPacket;
use pocketmine\network\mcpe\protocol\ClientboundPacket;
use pocketmine\network\mcpe\protocol\DisconnectPacket;
use pocketmine\network\mcpe\protocol\ModalFormRequestPacket;
Expand Down Expand Up @@ -1170,6 +1171,10 @@ public function onFormSent(int $id, Form $form) : bool{
return $this->sendDataPacket(ModalFormRequestPacket::create($id, json_encode($form, JSON_THROW_ON_ERROR)));
}

public function onCloseAllForms() : void{
$this->sendDataPacket(ClientboundCloseFormPacket::create());
}

/**
* Instructs the networksession to start using the chunk at the given coordinates. This may occur asynchronously.
* @param \Closure $onCompletion To be called when chunk sending has completed.
Expand Down
7 changes: 7 additions & 0 deletions src/player/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -2151,6 +2151,13 @@ public function onFormSubmit(int $formId, mixed $responseData) : bool{
return true;
}

/**
* Closes the current viewing form and forms in queue.
*/
public function closeAllForms() : void{
$this->getNetworkSession()->onCloseAllForms();
}

/**
* Transfers a player to another server.
*
Expand Down

0 comments on commit 616f96a

Please sign in to comment.