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

@ -26,7 +26,7 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3;
use pocketmine\math\Facing;
class GrassPath extends Transparent{
@ -53,7 +53,7 @@ class GrassPath extends Transparent{
}
public function onNearbyBlockChange() : void{
if($this->getSide(Vector3::SIDE_UP)->isSolid()){
if($this->getSide(Facing::UP)->isSolid()){
$this->level->setBlock($this, BlockFactory::get(Block::DIRT), true);
}
}