Replace all legacy blockID references with BlockIds::

This commit is contained in:
Dylan K. Taylor
2019-03-23 19:36:09 +00:00
parent f84d7ad70d
commit 79ef8e0803
79 changed files with 526 additions and 505 deletions

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\entity\projectile;
use pocketmine\block\Block;
use pocketmine\block\BlockIds;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\event\entity\ProjectileHitEvent;
use pocketmine\level\sound\EndermanTeleportSound;
@ -36,7 +37,7 @@ class EnderPearl extends Throwable{
public const NETWORK_ID = self::ENDER_PEARL;
protected function calculateInterceptWithBlock(Block $block, Vector3 $start, Vector3 $end) : ?RayTraceResult{
if($block->getId() !== Block::AIR and empty($block->getCollisionBoxes())){
if($block->getId() !== BlockIds::AIR and empty($block->getCollisionBoxes())){
//TODO: remove this once block collision boxes are fixed properly
return AxisAlignedBB::one()->offset($block->x, $block->y, $block->z)->calculateIntercept($start, $end);
}