Move block registration to its own class

This commit is contained in:
Dylan K. Taylor
2017-08-20 18:05:01 +01:00
committed by GitHub
parent 9451dd361e
commit 02f42eba48
62 changed files with 560 additions and 482 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, Block::get(Block::AIR), true, true);
$this->level->setBlock($this, BlockFactory::get(Block::AIR), true, true);
$fall = Entity::createEntity("FallingSand", $this->getLevel(), new CompoundTag("", [
new ListTag("Pos", [
new DoubleTag("", $this->x + 0.5),