From 2ba8eac27f13f92daf3ac3822f7fe26795877386 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 16 Aug 2019 17:27:41 +0100 Subject: [PATCH 1/4] FallingBlock: fix endless falling on top of fences this is a shitty fix, but I don't think there's a better way to do it on 3.x. This also fixes dropping on cactus. close #2449, close #2895 --- src/pocketmine/entity/object/FallingBlock.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/entity/object/FallingBlock.php b/src/pocketmine/entity/object/FallingBlock.php index 7d7d6cb1ca..7c47612e2e 100644 --- a/src/pocketmine/entity/object/FallingBlock.php +++ b/src/pocketmine/entity/object/FallingBlock.php @@ -33,6 +33,8 @@ use pocketmine\item\ItemFactory; use pocketmine\level\Position; use pocketmine\nbt\tag\ByteTag; use pocketmine\nbt\tag\IntTag; +use function abs; +use function floor; use function get_class; class FallingBlock extends Entity{ @@ -110,7 +112,7 @@ class FallingBlock extends Entity{ $this->flagForDespawn(); $block = $this->level->getBlock($pos); - if($block->isTransparent() and !$block->canBeReplaced()){ + if(($block->isTransparent() and !$block->canBeReplaced()) or abs($this->y - $this->getFloorY()) > 0.001){ //FIXME: anvils are supposed to destroy torches $this->getLevel()->dropItem($this, ItemFactory::get($this->getBlock(), $this->getDamage())); }else{ From 092edc9d43bb3061d0d743ab6e48f1d1fe18eb23 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 16 Aug 2019 17:41:50 +0100 Subject: [PATCH 2/4] avoid breaking concrete powder --- src/pocketmine/entity/object/FallingBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/object/FallingBlock.php b/src/pocketmine/entity/object/FallingBlock.php index 7c47612e2e..87e408d1f2 100644 --- a/src/pocketmine/entity/object/FallingBlock.php +++ b/src/pocketmine/entity/object/FallingBlock.php @@ -112,7 +112,7 @@ class FallingBlock extends Entity{ $this->flagForDespawn(); $block = $this->level->getBlock($pos); - if(($block->isTransparent() and !$block->canBeReplaced()) or abs($this->y - $this->getFloorY()) > 0.001){ + if(($block->isTransparent() and !$block->canBeReplaced()) or ($this->onGround and abs($this->y - $this->getFloorY()) > 0.001)){ //FIXME: anvils are supposed to destroy torches $this->getLevel()->dropItem($this, ItemFactory::get($this->getBlock(), $this->getDamage())); }else{ From 1be6783c34ec51b578464899994285a7e8188590 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 16 Aug 2019 17:58:01 +0100 Subject: [PATCH 3/4] Release 3.9.4 --- changelogs/3.9.md | 12 ++++++++++++ src/pocketmine/VersionInfo.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/changelogs/3.9.md b/changelogs/3.9.md index 9e3e86b758..8e2591f720 100644 --- a/changelogs/3.9.md +++ b/changelogs/3.9.md @@ -57,3 +57,15 @@ Plugin developers should **only** update their required API to this version if y - Fixed a memory leak on async task removal in error conditions. - Fixed scheduled block updates (for example liquid) triggering chunk reloading. This could cause a significant performance issue in some conditions. - Fixed some minor cosmetic issues in documentation. + +# 3.9.4 +- Fixed a memory leak when scheduled updates were pending on a chunk being unloaded. +- Fixed plugin detection in crashdumps. Previously `src/pocketmine` anywhere in the path would cause the error to be considered a core crash, regardless of the preceding path. +- Fixed entity metadata types for 1.12. The SLOT type was removed and a COMPOUND_TAG type added. This change involves changes to internal API which may break plugins. **See the warning at the top of this changelog about API versioning.** +- Fixed random and base populator amounts of trees and tallgrass never being initialized. This bug had no obvious effect, but may have become a problem in future PHP versions. +- The following internal methods have been marked as `@deprecated` and documentation warnings added: + - `Entity->getBlocksAround()` + - `Entity->despawnFrom()` + - `Entity->despawnFromAll()` +- Fixed plugin `softdepend` not influencing load order when a soft-depended plugin had an unresolved soft dependency of its own. +- Fixed endless falling of sand on top of fences. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 25617f9eb3..310d078735 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -23,5 +23,5 @@ namespace pocketmine; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.9.4"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From a19143cae76ad55f1bdc2f39ad007b1fc170980b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 16 Aug 2019 17:58:02 +0100 Subject: [PATCH 4/4] 3.9.5 is next --- src/pocketmine/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 310d078735..d87f84ae45 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -22,6 +22,6 @@ namespace pocketmine; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.9.4"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.9.5"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0;