From a95d17398975ed77d0bdb7a83ffad30d91c3df9b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 6 May 2017 18:57:34 +0100 Subject: [PATCH] Fixed a couple of repeated Level->getBlock() calls in Liquid --- src/pocketmine/block/Liquid.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/block/Liquid.php b/src/pocketmine/block/Liquid.php index 8eb1d2973..0c92270c6 100644 --- a/src/pocketmine/block/Liquid.php +++ b/src/pocketmine/block/Liquid.php @@ -216,7 +216,7 @@ abstract class Liquid extends Transparent{ $k = -1; } - if(($topFlowDecay = $this->getFlowDecay($this->level->getBlock($this->level->getBlock($this->temporalVector->setComponents($this->x, $this->y + 1, $this->z))))) >= 0){ + if(($topFlowDecay = $this->getFlowDecay($this->level->getBlock($this->temporalVector->setComponents($this->x, $this->y + 1, $this->z)))) >= 0){ if($topFlowDecay >= 8){ $k = $topFlowDecay; }else{ @@ -225,7 +225,7 @@ abstract class Liquid extends Transparent{ } if($this->adjacentSources >= 2 and $this instanceof Water){ - $bottomBlock = $this->level->getBlock($this->level->getBlock($this->temporalVector->setComponents($this->x, $this->y - 1, $this->z))); + $bottomBlock = $this->level->getBlock($this->temporalVector->setComponents($this->x, $this->y - 1, $this->z)); if($bottomBlock->isSolid()){ $k = 0; }elseif($bottomBlock instanceof Water and $bottomBlock->getDamage() === 0){