water physics tweaked

This commit is contained in:
GameHerobrine 2023-09-07 14:16:33 +03:00
parent 1545903159
commit 972a08d171
2 changed files with 4 additions and 3 deletions

View file

@ -27,6 +27,7 @@ class WaterBlock extends LiquidBlock{
}
public function checkLava(){
$ret = false;
for($side = 0; $side <= 5; ++$side){
if($side == 1){
continue;
@ -39,10 +40,10 @@ class WaterBlock extends LiquidBlock{
}else{
$this->level->setBlock($b, new CobblestoneBlock(), false, false, true);
}
return true;
$ret = true;
}
}
return false;
return $ret;
}
public function getFrom(){

View file

@ -25,7 +25,7 @@ class BucketItem extends Item{
}
}elseif($this->meta === WATER){
//Support Make Non-Support Water to Support Water
if($block->getID() === AIR || ( $block instanceof WaterBlock && ($block->getMetadata() & 0x07) != 0x00 ) ){
if($block->getID() === AIR || ( $block instanceof WaterBlock && ($block->getMetadata() & 0x07) != 0x00 ) || ($block instanceof LavaBlock)){
$water = new WaterBlock();
$level->setBlock($block, $water, true, false, true);
ServerAPI::request()->api->block->scheduleBlockUpdate($block, 5, BLOCK_UPDATE_NORMAL);