mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Vine: don't break when a supported vine is above, closes #2452
This commit is contained in:
parent
c96203b528
commit
d151a89037
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user