mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Rename BlockIds -> BlockLegacyIds
This commit is contained in:
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\entity\object;
|
||||
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\block\BlockIds;
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\event\entity\EntityDamageByEntityEvent;
|
||||
use pocketmine\item\Item;
|
||||
@ -109,7 +109,7 @@ class Painting extends Entity{
|
||||
//non-living entities don't have a way to create drops generically yet
|
||||
$this->level->dropItem($this, ItemFactory::get(Item::PAINTING));
|
||||
}
|
||||
$this->level->addParticle($this->add(0.5, 0.5, 0.5), new DestroyBlockParticle(BlockFactory::get(BlockIds::PLANKS)));
|
||||
$this->level->addParticle($this->add(0.5, 0.5, 0.5), new DestroyBlockParticle(BlockFactory::get(BlockLegacyIds::PLANKS)));
|
||||
}
|
||||
|
||||
protected function recalculateBoundingBox() : void{
|
||||
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\entity\projectile;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockIds;
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\event\entity\ProjectileHitEvent;
|
||||
use pocketmine\level\sound\EndermanTeleportSound;
|
||||
@ -37,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() !== BlockIds::AIR and empty($block->getCollisionBoxes())){
|
||||
if($block->getId() !== BlockLegacyIds::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);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\entity\projectile;
|
||||
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\block\BlockIds;
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\entity\effect\EffectInstance;
|
||||
use pocketmine\entity\effect\InstantEffect;
|
||||
use pocketmine\entity\Living;
|
||||
@ -121,12 +121,12 @@ class SplashPotion extends Throwable{
|
||||
}elseif($event instanceof ProjectileHitBlockEvent and $this->getPotionId() === Potion::WATER){
|
||||
$blockIn = $event->getBlockHit()->getSide($event->getRayTraceResult()->getHitFace());
|
||||
|
||||
if($blockIn->getId() === BlockIds::FIRE){
|
||||
$this->level->setBlock($blockIn, BlockFactory::get(BlockIds::AIR));
|
||||
if($blockIn->getId() === BlockLegacyIds::FIRE){
|
||||
$this->level->setBlock($blockIn, BlockFactory::get(BlockLegacyIds::AIR));
|
||||
}
|
||||
foreach($blockIn->getHorizontalSides() as $horizontalSide){
|
||||
if($horizontalSide->getId() === BlockIds::FIRE){
|
||||
$this->level->setBlock($horizontalSide, BlockFactory::get(BlockIds::AIR));
|
||||
if($horizontalSide->getId() === BlockLegacyIds::FIRE){
|
||||
$this->level->setBlock($horizontalSide, BlockFactory::get(BlockLegacyIds::AIR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user