Skip to content

Commit

Permalink
1.20.40 (#1)
Browse files Browse the repository at this point in the history
* Changes for 1.20.40

* 1.20.40 changes (PM4)

* Update PHPStan

* Release 4.25.0

* 4.25.1 is next

* Release 5.7.0

* 5.7.1 is next

---------

Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
  • Loading branch information
theohdg2 and dktapps authored Oct 26, 2023
1 parent 438cfa3 commit c55f942
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 38 deletions.
16 changes: 16 additions & 0 deletions changelogs/4.25.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 4.25.0
Released 26th October 2023.

**For Minecraft: Bedrock Edition 1.20.40**

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

**Plugin compatibility:** Plugins for previous 4.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` 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.20.40.
- Removed support for older versions.
20 changes: 20 additions & 0 deletions changelogs/5.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 5.7.0
Released 26th October 2023.

**For Minecraft: Bedrock Edition 1.20.40**

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

**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.20.40.
- Removed support for older versions.

## Fixes
- Fixed `cartography_table`, `smithing_table`, `stripped_cherry_log` and `stripped_cherry_wood` not working in `StringToItemParser`.
- Fixed `Promise<null>::onCompletion()` always calling the reject handler if the promise was already completed.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"composer-runtime-api": "^2.0",
"adhocore/json-comment": "~1.2.0",
"pocketmine/netresearch-jsonmapper": "~v4.2.1000",
"pocketmine/bedrock-block-upgrade-schema": "~3.2.0+bedrock-1.20.30",
"pocketmine/bedrock-data": "~2.5.0+bedrock-1.20.30",
"pocketmine/bedrock-block-upgrade-schema": "~3.3.0+bedrock-1.20.40",
"pocketmine/bedrock-data": "~2.6.0+bedrock-1.20.40",
"pocketmine/bedrock-item-upgrade-schema": "~1.5.0+bedrock-1.20.30",
"pocketmine/bedrock-protocol": "~24.0.0+bedrock-1.20.30",
"pocketmine/bedrock-protocol": "~25.0.0+bedrock-1.20.40",
"pocketmine/binaryutils": "^0.2.1",
"pocketmine/callback-validator": "^1.0.2",
"pocketmine/color": "^0.3.0",
Expand Down
40 changes: 20 additions & 20 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.6.2";
public const BASE_VERSION = "5.7.1";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable";

Expand Down
4 changes: 2 additions & 2 deletions src/data/bedrock/block/BlockStateData.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ final class BlockStateData{
public const CURRENT_VERSION =
(1 << 24) | //major
(20 << 16) | //minor
(30 << 8) | //patch
(50); //revision
(40 << 8) | //patch
(3); //revision

public const TAG_NAME = "name";
public const TAG_STATES = "states";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ private function registerSerializers() : void{
});
$this->map(Blocks::CHEST(), function(Chest $block) : Writer{
return Writer::create(Ids::CHEST)
->writeHorizontalFacing($block->getFacing());
->writeCardinalHorizontalFacing($block->getFacing());
});
$this->map(Blocks::CHISELED_QUARTZ(), fn(SimplePillar $block) => Helper::encodeQuartz(StringValues::CHISEL_TYPE_CHISELED, $block->getAxis()));
$this->map(Blocks::CHISELED_RED_SANDSTONE(), fn() => Helper::encodeSandstone(Ids::RED_SANDSTONE, StringValues::SAND_STONE_TYPE_HEIROGLYPHS));
Expand Down Expand Up @@ -1274,7 +1274,7 @@ private function registerSerializers() : void{
$this->map(Blocks::ELEMENT_CONSTRUCTOR(), fn(ChemistryTable $block) => Helper::encodeChemistryTable($block, StringValues::CHEMISTRY_TABLE_TYPE_ELEMENT_CONSTRUCTOR, new Writer(Ids::CHEMISTRY_TABLE)));
$this->map(Blocks::ENDER_CHEST(), function(EnderChest $block) : Writer{
return Writer::create(Ids::ENDER_CHEST)
->writeHorizontalFacing($block->getFacing());
->writeCardinalHorizontalFacing($block->getFacing());
});
$this->map(Blocks::END_PORTAL_FRAME(), function(EndPortalFrame $block) : Writer{
return Writer::create(Ids::END_PORTAL_FRAME)
Expand Down Expand Up @@ -1606,7 +1606,7 @@ private function registerSerializers() : void{
});
$this->map(Blocks::STONE(), fn() => Helper::encodeStone(StringValues::STONE_TYPE_STONE));
$this->map(Blocks::STONECUTTER(), fn(Stonecutter $block) => Writer::create(Ids::STONECUTTER_BLOCK)
->writeHorizontalFacing($block->getFacing()));
->writeCardinalHorizontalFacing($block->getFacing()));
$this->map(Blocks::STONE_BRICKS(), fn() => Helper::encodeStoneBricks(StringValues::STONE_BRICK_TYPE_DEFAULT));
$this->map(Blocks::STONE_BRICK_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab1($block, StringValues::STONE_SLAB_TYPE_STONE_BRICK));
$this->mapStairs(Blocks::STONE_BRICK_STAIRS(), Ids::STONE_BRICK_STAIRS);
Expand Down Expand Up @@ -1637,7 +1637,7 @@ private function registerSerializers() : void{
});
$this->map(Blocks::TRAPPED_CHEST(), function(TrappedChest $block) : Writer{
return Writer::create(Ids::TRAPPED_CHEST)
->writeHorizontalFacing($block->getFacing());
->writeCardinalHorizontalFacing($block->getFacing());
});
$this->map(Blocks::TRIPWIRE(), function(Tripwire $block) : Writer{
return Writer::create(Ids::TRIP_WIRE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ private function registerDeserializers() : void{
});
$this->map(Ids::CHEST, function(Reader $in) : Block{
return Blocks::CHEST()
->setFacing($in->readHorizontalFacing());
->setFacing($in->readCardinalHorizontalFacing());
});
$this->map(Ids::CHORUS_FLOWER, function(Reader $in) : Block{
return Blocks::CHORUS_FLOWER()
Expand Down Expand Up @@ -1095,7 +1095,7 @@ private function registerDeserializers() : void{
});
$this->map(Ids::ENDER_CHEST, function(Reader $in) : Block{
return Blocks::ENDER_CHEST()
->setFacing($in->readHorizontalFacing());
->setFacing($in->readCardinalHorizontalFacing());
});
$this->map(Ids::EXPOSED_COPPER, fn() => Helper::decodeCopper(Blocks::COPPER(), CopperOxidation::EXPOSED()));
$this->map(Ids::EXPOSED_CUT_COPPER, fn() => Helper::decodeCopper(Blocks::CUT_COPPER(), CopperOxidation::EXPOSED()));
Expand Down Expand Up @@ -1504,7 +1504,7 @@ private function registerDeserializers() : void{
});
$this->map(Ids::STONECUTTER_BLOCK, function(Reader $in) : Block{
return Blocks::STONECUTTER()
->setFacing($in->readHorizontalFacing());
->setFacing($in->readCardinalHorizontalFacing());
});
$this->map(Ids::SWEET_BERRY_BUSH, function(Reader $in) : Block{
//berry bush only wants 0-3, but it can be bigger in MCPE due to misuse of GROWTH state which goes up to 7
Expand All @@ -1530,7 +1530,7 @@ private function registerDeserializers() : void{
});
$this->map(Ids::TRAPPED_CHEST, function(Reader $in) : Block{
return Blocks::TRAPPED_CHEST()
->setFacing($in->readHorizontalFacing());
->setFacing($in->readCardinalHorizontalFacing());
});
$this->map(Ids::TRIP_WIRE, function(Reader $in) : Block{
return Blocks::TRIPWIRE()
Expand Down
2 changes: 1 addition & 1 deletion src/network/mcpe/NetworkSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ private function sendDisconnectPacket(Translatable|string $message) : void{
}else{
$translated = $message;
}
$this->sendDataPacket(DisconnectPacket::create($translated));
$this->sendDataPacket(DisconnectPacket::create(0, $translated));
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/world/format/io/data/BedrockWorldData.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
class BedrockWorldData extends BaseNbtWorldData{

public const CURRENT_STORAGE_VERSION = 10;
public const CURRENT_STORAGE_NETWORK_VERSION = 618;
public const CURRENT_STORAGE_NETWORK_VERSION = 622;
public const CURRENT_CLIENT_VERSION_TARGET = [
1, //major
20, //minor
30, //patch
2, //revision
40, //patch
1, //revision
0 //is beta
];

Expand Down

0 comments on commit c55f942

Please sign in to comment.