Bucket: Fixed appearing empty when picking up still liquids

Buckets already affected by this bug will still appear empty until used. After that they'll work fine.
This commit is contained in:
Dylan K. Taylor
2018-01-03 14:22:53 +00:00
parent db52501462
commit 33352638a9
4 changed files with 22 additions and 2 deletions

View File

@ -48,6 +48,14 @@ class Lava extends Liquid{
return "Lava";
}
public function getStillForm() : Block{
return BlockFactory::get(Block::STILL_LAVA, $this->meta);
}
public function getFlowingForm() : Block{
return BlockFactory::get(Block::FLOWING_LAVA, $this->meta);
}
public function tickRate() : int{
return 30;
}

View File

@ -76,6 +76,10 @@ abstract class Liquid extends Transparent{
return [];
}
abstract public function getStillForm() : Block;
abstract public function getFlowingForm() : Block;
public function getFluidHeightPercent(){
$d = $this->meta;
if($d >= 8){

View File

@ -44,6 +44,14 @@ class Water extends Liquid{
return 2;
}
public function getStillForm() : Block{
return BlockFactory::get(Block::STILL_WATER, $this->meta);
}
public function getFlowingForm() : Block{
return BlockFactory::get(Block::FLOWING_WATER, $this->meta);
}
public function tickRate() : int{
return 5;
}