mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Fixed a couple of repeated Level->getBlock() calls in Liquid
This commit is contained in:
parent
e72d8cf8f5
commit
a95d173989
@ -216,7 +216,7 @@ abstract class Liquid extends Transparent{
|
|||||||
$k = -1;
|
$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){
|
if($topFlowDecay >= 8){
|
||||||
$k = $topFlowDecay;
|
$k = $topFlowDecay;
|
||||||
}else{
|
}else{
|
||||||
@ -225,7 +225,7 @@ abstract class Liquid extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->adjacentSources >= 2 and $this instanceof Water){
|
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()){
|
if($bottomBlock->isSolid()){
|
||||||
$k = 0;
|
$k = 0;
|
||||||
}elseif($bottomBlock instanceof Water and $bottomBlock->getDamage() === 0){
|
}elseif($bottomBlock instanceof Water and $bottomBlock->getDamage() === 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user