Remove another dead function

This commit is contained in:
Dylan K. Taylor 2019-02-23 17:15:50 +00:00
parent 49f9605620
commit 878c704597
2 changed files with 7 additions and 12 deletions

View File

@ -73,6 +73,7 @@ use pocketmine\nbt\tag\StringTag;
use pocketmine\network\mcpe\ChunkRequestTask; use pocketmine\network\mcpe\ChunkRequestTask;
use pocketmine\network\mcpe\CompressBatchPromise; use pocketmine\network\mcpe\CompressBatchPromise;
use pocketmine\network\mcpe\protocol\AddEntityPacket; use pocketmine\network\mcpe\protocol\AddEntityPacket;
use pocketmine\network\mcpe\protocol\BlockEntityDataPacket;
use pocketmine\network\mcpe\protocol\ClientboundPacket; use pocketmine\network\mcpe\protocol\ClientboundPacket;
use pocketmine\network\mcpe\protocol\LevelEventPacket; use pocketmine\network\mcpe\protocol\LevelEventPacket;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket; use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
@ -982,7 +983,12 @@ class Level implements ChunkManager, Metadatable{
$tile = $this->getTileAt($b->x, $b->y, $b->z); $tile = $this->getTileAt($b->x, $b->y, $b->z);
if($tile instanceof Spawnable){ if($tile instanceof Spawnable){
$packets[] = $tile->createSpawnPacket(); $tilepk = new BlockEntityDataPacket();
$tilepk->x = $tile->x;
$tilepk->y = $tile->y;
$tilepk->z = $tile->z;
$tilepk->namedtag = $tile->getSerializedSpawnCompound();
$packets[] = $tilepk;
} }
} }

View File

@ -27,7 +27,6 @@ use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\tag\IntTag; use pocketmine\nbt\tag\IntTag;
use pocketmine\nbt\tag\StringTag; use pocketmine\nbt\tag\StringTag;
use pocketmine\network\mcpe\NetworkNbtSerializer; use pocketmine\network\mcpe\NetworkNbtSerializer;
use pocketmine\network\mcpe\protocol\BlockEntityDataPacket;
use pocketmine\Player; use pocketmine\Player;
use function get_class; use function get_class;
@ -40,16 +39,6 @@ abstract class Spawnable extends Tile{
/** @var NetworkNbtSerializer|null */ /** @var NetworkNbtSerializer|null */
private static $nbtWriter = null; private static $nbtWriter = null;
public function createSpawnPacket() : BlockEntityDataPacket{
$pk = new BlockEntityDataPacket();
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
$pk->namedtag = $this->getSerializedSpawnCompound();
return $pk;
}
/** /**
* Flags the tile as modified, so that updates will be broadcasted at the next available opportunity. * Flags the tile as modified, so that updates will be broadcasted at the next available opportunity.
* This MUST be called any time a change is made that players must be able to see. * This MUST be called any time a change is made that players must be able to see.