From d151a89037715841c6776df48b42e3bfb6f5a566 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 12 Oct 2018 18:38:52 +0100 Subject: [PATCH] Vine: don't break when a supported vine is above, closes #2452 --- src/pocketmine/block/Vine.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/block/Vine.php b/src/pocketmine/block/Vine.php index 4ffe88008..81d7d928b 100644 --- a/src/pocketmine/block/Vine.php +++ b/src/pocketmine/block/Vine.php @@ -163,8 +163,13 @@ class Vine extends Flowable{ public function onNearbyBlockChange() : void{ $changed = false; + + $up = $this->getSide(Facing::UP); + //check which faces have corresponding vines in the block above + $supportedFaces = $up instanceof Vine ? array_intersect_key($this->faces, $up->faces) : []; + foreach($this->faces as $face => $bool){ - if(!$this->getSide($face)->isSolid()){ + if(!isset($supportedFaces[$face]) and !$this->getSide($face)->isSolid()){ unset($this->faces[$face]); $changed = true; }