Implemented concrete powder

this is a little buggy with water updating due to a hack for liquids to fix a CPU leak (210bdc2436), but everything works fine when a block nearby gets updated.
This commit is contained in:
Dylan K. Taylor
2017-09-26 18:56:43 +01:00
parent 827ee5d4f9
commit c79a5509f6
4 changed files with 117 additions and 19 deletions

View File

@ -39,7 +39,7 @@ abstract class Fallable extends Solid{
if($type === Level::BLOCK_UPDATE_NORMAL){
$down = $this->getSide(Vector3::SIDE_DOWN);
if($down->getId() === self::AIR or ($down instanceof Liquid)){
$this->level->setBlock($this, BlockFactory::get(Block::AIR), true, true);
$this->level->setBlock($this, BlockFactory::get(Block::AIR), true);
$fall = Entity::createEntity("FallingSand", $this->getLevel(), new CompoundTag("", [
new ListTag("Pos", [
new DoubleTag("", $this->x + 0.5),
@ -63,4 +63,11 @@ abstract class Fallable extends Solid{
}
}
}
/**
* @return null|Block
*/
public function tickFalling() : ?Block{
return null;
}
}