diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 993b80367..b33ae2404 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,8 @@ updates: interval: daily time: "10:00" open-pull-requests-limit: 10 + +- package-ecosystem: gitsubmodule + directory: "/" + schedule: + interval: daily diff --git a/build/php b/build/php index bd329dba0..30eed13fa 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit bd329dba08242b6ecb99ef7fbf9a0031dcbbb3ff +Subproject commit 30eed13faaa8995814b1ada426b7e947f891ee3c diff --git a/changelogs/4.0.md b/changelogs/4.0.md index ec6f7fa60..b7b66c4a4 100644 --- a/changelogs/4.0.md +++ b/changelogs/4.0.md @@ -1627,3 +1627,21 @@ Released 25th January 2022. ## Fixes - Fixed ender chest not dropping itself when mined with a Silk Touch pickaxe. - The correct amount of fall damage is now taken when falling from a height onto hay bales. + +# 4.0.9 +Released 5th February 2022. + +## Fixes +### Core +- The spawn chunk of the default world is no longer loaded during shutdown. Previously, it would attempt to find a safe spawn to teleport players to, only to unload the target world of that safe spawn and not use it. +- The spawn chunk of the default world is no longer loaded when unloading a non-default world containing zero players. +- Fixed chunk version `8` in Bedrock worlds being treated as corrupted. These appeared in worlds between 1.2.13 and 1.8.0. + +### API +- Added missing bounds check to `Liquid->setDecay()`. +- Fixed `StringToItemParser` returning concrete instead of concrete powder when given `_concrete_powder`. + +### Gameplay +- Cobwebs now drop themselves when broken using shears. +- Fixed spectator players being able to drop items. +- Fixed collision shapes of Bell in different orientations. diff --git a/src/item/StringToItemParser.php b/src/item/StringToItemParser.php index 843beae49..5c00b7650 100644 --- a/src/item/StringToItemParser.php +++ b/src/item/StringToItemParser.php @@ -49,7 +49,7 @@ final class StringToItemParser extends StringToTParser{ $result->registerBlock($prefix("bed"), fn() => VanillaBlocks::BED()->setColor($color)); $result->registerBlock($prefix("carpet"), fn() => VanillaBlocks::CARPET()->setColor($color)); $result->registerBlock($prefix("concrete"), fn() => VanillaBlocks::CONCRETE()->setColor($color)); - $result->registerBlock($prefix("concrete_powder"), fn() => VanillaBlocks::CONCRETE()->setColor($color)); + $result->registerBlock($prefix("concrete_powder"), fn() => VanillaBlocks::CONCRETE_POWDER()->setColor($color)); $result->registerBlock($prefix("stained_clay"), fn() => VanillaBlocks::STAINED_CLAY()->setColor($color)); $result->registerBlock($prefix("stained_glass"), fn() => VanillaBlocks::STAINED_GLASS()->setColor($color)); $result->registerBlock($prefix("stained_glass_pane"), fn() => VanillaBlocks::STAINED_GLASS_PANE()->setColor($color)); diff --git a/src/network/mcpe/encryption/EncryptionContext.php b/src/network/mcpe/encryption/EncryptionContext.php index 18d469468..f8515c9c6 100644 --- a/src/network/mcpe/encryption/EncryptionContext.php +++ b/src/network/mcpe/encryption/EncryptionContext.php @@ -61,7 +61,7 @@ class EncryptionContext{ } /** - * Returns an EncryptionContext suitable for decrypting Minecraft packets from 1.16.200 and up. + * Returns an EncryptionContext suitable for decrypting Minecraft packets from 1.16.220.50 (protocol version 429) and up. * * MCPE uses GCM, but without the auth tag, which defeats the whole purpose of using GCM. * GCM is just a wrapper around CTR which adds the auth tag, so CTR can replace GCM for this case. diff --git a/src/resourcepacks/ZippedResourcePack.php b/src/resourcepacks/ZippedResourcePack.php index 347a197dd..d67a205fc 100644 --- a/src/resourcepacks/ZippedResourcePack.php +++ b/src/resourcepacks/ZippedResourcePack.php @@ -106,7 +106,6 @@ class ZippedResourcePack implements ResourcePack{ } $mapper = new \JsonMapper(); - $mapper->bExceptionOnUndefinedProperty = true; $mapper->bExceptionOnMissingData = true; try{ diff --git a/src/world/WorldManager.php b/src/world/WorldManager.php index 65fe54726..fda2bdcb6 100644 --- a/src/world/WorldManager.php +++ b/src/world/WorldManager.php @@ -153,16 +153,18 @@ class WorldManager{ } $this->server->getLogger()->info($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_level_unloading($world->getDisplayName()))); - try{ - $safeSpawn = $this->defaultWorld !== null ? $this->defaultWorld->getSafeSpawn() : null; - }catch(WorldException $e){ - $safeSpawn = null; - } - foreach($world->getPlayers() as $player){ - if($world === $this->defaultWorld || $safeSpawn === null){ - $player->disconnect("Forced default world unload"); - }else{ - $player->teleport($safeSpawn); + if(count($world->getPlayers()) !== 0){ + try{ + $safeSpawn = $this->defaultWorld !== null && $this->defaultWorld !== $world ? $this->defaultWorld->getSafeSpawn() : null; + }catch(WorldException $e){ + $safeSpawn = null; + } + foreach($world->getPlayers() as $player){ + if($safeSpawn === null){ + $player->disconnect("Forced default world unload"); + }else{ + $player->teleport($safeSpawn); + } } } diff --git a/src/world/format/io/leveldb/LevelDB.php b/src/world/format/io/leveldb/LevelDB.php index 91d367fb0..842708ed7 100644 --- a/src/world/format/io/leveldb/LevelDB.php +++ b/src/world/format/io/leveldb/LevelDB.php @@ -263,6 +263,7 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{ case 11: //MCPE 1.11.0.1 beta (???) case 10: //MCPE 1.9 (???) case 9: //MCPE 1.8 (???) + case 8: //MCPE 1.2.13 (paletted subchunks) case 7: //MCPE 1.2 (???) case 6: //MCPE 1.2.0.2 beta (???) case 4: //MCPE 1.1 diff --git a/tests/plugins/DevTools b/tests/plugins/DevTools index 39510af5b..e884a4c23 160000 --- a/tests/plugins/DevTools +++ b/tests/plugins/DevTools @@ -1 +1 @@ -Subproject commit 39510af5bcf19eef3b3157c8c51d88a736811591 +Subproject commit e884a4c234629126203e769df7c4dbbbc0dc2d49