Replace BlockLegacyIds usages with BlockTypeIds where possible

This commit is contained in:
Dylan K. Taylor
2022-06-05 21:17:10 +01:00
parent f97c22c341
commit d2613039ed
31 changed files with 65 additions and 64 deletions

View File

@ -24,7 +24,7 @@ declare(strict_types=1);
namespace pocketmine\block\utils;
use pocketmine\block\Block;
use pocketmine\block\BlockLegacyIds;
use pocketmine\block\BlockTypeIds;
use pocketmine\block\Fire;
use pocketmine\block\Liquid;
use pocketmine\block\VanillaBlocks;
@ -50,7 +50,7 @@ trait FallableTrait{
public function onNearbyBlockChange() : void{
$pos = $this->getPosition();
$down = $pos->getWorld()->getBlock($pos->getSide(Facing::DOWN));
if($down->getId() === BlockLegacyIds::AIR || $down instanceof Liquid || $down instanceof Fire){
if($down->getTypeId() === BlockTypeIds::AIR || $down instanceof Liquid || $down instanceof Fire){
$pos->getWorld()->setBlock($pos, VanillaBlocks::AIR());
$block = $this;