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

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\event\player;
use pocketmine\block\BlockLegacyIds;
use pocketmine\block\BlockTypeIds;
use pocketmine\entity\Living;
use pocketmine\event\entity\EntityDamageByBlockEvent;
use pocketmine\event\entity\EntityDamageByEntityEvent;
@ -138,7 +138,7 @@ class PlayerDeathEvent extends EntityDeathEvent{
case EntityDamageEvent::CAUSE_CONTACT:
if($deathCause instanceof EntityDamageByBlockEvent){
if($deathCause->getDamager()->getId() === BlockLegacyIds::CACTUS){
if($deathCause->getDamager()->getTypeId() === BlockTypeIds::CACTUS){
return KnownTranslationFactory::death_attack_cactus($name);
}
}