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\entity;
use pocketmine\block\Block;
use pocketmine\block\BlockLegacyIds;
use pocketmine\block\BlockTypeIds;
use pocketmine\data\bedrock\EffectIdMap;
use pocketmine\entity\animation\DeathAnimation;
use pocketmine\entity\animation\HurtAnimation;
@ -346,7 +346,7 @@ abstract class Living extends Entity{
new EntityLongFallSound($this) :
new EntityShortFallSound($this)
);
}elseif($fallBlock->getId() !== BlockLegacyIds::AIR){
}elseif($fallBlock->getTypeId() !== BlockTypeIds::AIR){
$this->broadcastSound(new EntityLandSound($this, $fallBlock));
}
return $newVerticalVelocity;
@ -756,10 +756,10 @@ abstract class Living extends Entity{
--$nextIndex;
}
$id = $block->getId();
$id = $block->getTypeId();
if($transparent === null){
if($id !== BlockLegacyIds::AIR){
if($id !== BlockTypeIds::AIR){
break;
}
}else{