Separate facing/bearing handling from Vector3, deobfusticate a ton of @shoghicp old code

This commit is contained in:
Dylan K. Taylor
2018-09-05 19:56:14 +01:00
parent 99fb267333
commit f218868338
57 changed files with 338 additions and 384 deletions

View File

@ -24,12 +24,12 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\entity\Entity;
use pocketmine\math\Vector3;
use pocketmine\math\Facing;
abstract class Fallable extends Solid{
public function onNearbyBlockChange() : void{
$down = $this->getSide(Vector3::SIDE_DOWN);
$down = $this->getSide(Facing::DOWN);
if($down->getId() === self::AIR or $down instanceof Liquid or $down instanceof Fire){
$this->level->setBlock($this, BlockFactory::get(Block::AIR), true);