mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fix Performance Problem
Welcome, TPS!
This commit is contained in:
parent
fe70fa467d
commit
7acdb0dd3f
@ -121,7 +121,7 @@ class WaterBlock extends LiquidBlock{
|
|||||||
$b = $this->getSide($side);
|
$b = $this->getSide($side);
|
||||||
if($b instanceof WaterBlock)
|
if($b instanceof WaterBlock)
|
||||||
{
|
{
|
||||||
if( $this->getSourceCount() >= 2)
|
if( $this->getSourceCount() >= 2 && $level != 0x00)
|
||||||
{
|
{
|
||||||
$this->level->setBlock($this, new WaterBlock(0), false, false, true);
|
$this->level->setBlock($this, new WaterBlock(0), false, false, true);
|
||||||
}
|
}
|
||||||
|
@ -469,11 +469,14 @@ class PMFLevel extends PMF{
|
|||||||
++$this->chunkChange[$index][$Y];
|
++$this->chunkChange[$index][$Y];
|
||||||
}
|
}
|
||||||
$this->chunkChange[$index][-1] = true;
|
$this->chunkChange[$index][-1] = true;
|
||||||
$pos = new Position($x, $y, $z, $this->level);
|
if($old_b instanceof LiquidBlock)
|
||||||
for($side = 0; $side <= 5; ++$side)
|
|
||||||
{
|
{
|
||||||
$b = $pos->getSide($side);
|
$pos = new Position($x, $y, $z, $this->level);
|
||||||
ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL);
|
for($side = 0; $side <= 5; ++$side)
|
||||||
|
{
|
||||||
|
$b = $pos->getSide($side);
|
||||||
|
ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user