mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
infinite water source fix
This commit is contained in:
parent
6a2eccfb65
commit
19714543d2
1 changed files with 4 additions and 2 deletions
|
|
@ -63,6 +63,7 @@ class WaterBlock extends LiquidBlock{
|
||||||
//return false;
|
//return false;
|
||||||
$newId = $this->id;
|
$newId = $this->id;
|
||||||
$level = $this->meta & 0x07;
|
$level = $this->meta & 0x07;
|
||||||
|
|
||||||
if($type !== BLOCK_UPDATE_NORMAL){
|
if($type !== BLOCK_UPDATE_NORMAL){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -82,8 +83,8 @@ class WaterBlock extends LiquidBlock{
|
||||||
for($side = 2; $side <= 5; ++$side){
|
for($side = 2; $side <= 5; ++$side){
|
||||||
$b = $this->getSide($side);
|
$b = $this->getSide($side);
|
||||||
if($b instanceof WaterBlock){
|
if($b instanceof WaterBlock){
|
||||||
if($this->getSourceCount() >= 2 && $level != 0x00){
|
if($this->getSourceCount() >= 2 && $level != 0x00){ //Infinite water source
|
||||||
$this->level->setBlock($this, new WaterBlock(1), false, false, true); //TODO fix somehow
|
$this->level->setBlock($this, new WaterBlock(0), false, false, true);
|
||||||
}
|
}
|
||||||
}elseif($b->isFlowable === true){
|
}elseif($b->isFlowable === true){
|
||||||
$this->level->setBlock($b, new WaterBlock($level + 1), false, false, true);
|
$this->level->setBlock($b, new WaterBlock($level + 1), false, false, true);
|
||||||
|
|
@ -112,6 +113,7 @@ class WaterBlock extends LiquidBlock{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ServerAPI::request()->api->block->blockUpdateAround($this, BLOCK_UPDATE_NORMAL, 5);
|
||||||
$this->level->setBlock($this, new AirBlock(), false, false, true);
|
$this->level->setBlock($this, new AirBlock(), false, false, true);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue