mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk. - Chunk->getProvider() and Chunk->setProvider() have been removed. - Chunk::__construct() has had the $provider parameter removed. - Chunk->unload() has had the unused $save parameter removed. - ChunkEvents now take a Level parameter instead of going through the Chunk API bump to 3.0.0-ALPHA4
This commit is contained in:
@ -26,7 +26,7 @@ use pocketmine\event\entity\EntityDamageByChildEntityEvent;
|
||||
use pocketmine\event\entity\EntityDamageByEntityEvent;
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\event\entity\ProjectileHitEvent;
|
||||
use pocketmine\level\format\Chunk;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\level\MovingObjectPosition;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
@ -42,12 +42,12 @@ abstract class Projectile extends Entity{
|
||||
|
||||
public $hadCollision = false;
|
||||
|
||||
public function __construct(Chunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null){
|
||||
public function __construct(Level $level, CompoundTag $nbt, Entity $shootingEntity = null){
|
||||
$this->shootingEntity = $shootingEntity;
|
||||
if($shootingEntity !== null){
|
||||
$this->setDataProperty(self::DATA_SHOOTER_ID, self::DATA_TYPE_LONG, $shootingEntity->getId());
|
||||
}
|
||||
parent::__construct($chunk, $nbt);
|
||||
parent::__construct($level, $nbt);
|
||||
}
|
||||
|
||||
public function attack($damage, EntityDamageEvent $source){
|
||||
|
Reference in New Issue
Block a user