From f755ea6043d7bf5f23093f780bb30157ddcc0054 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 27 Aug 2019 19:25:55 +0100 Subject: [PATCH] DestroyBlockParticle: keep block reference around instead of runtimeID we'll need this for protocol abstraction --- src/world/particle/DestroyBlockParticle.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/world/particle/DestroyBlockParticle.php b/src/world/particle/DestroyBlockParticle.php index 71fe7075d..3039fbe40 100644 --- a/src/world/particle/DestroyBlockParticle.php +++ b/src/world/particle/DestroyBlockParticle.php @@ -29,14 +29,14 @@ use pocketmine\network\mcpe\protocol\LevelEventPacket; class DestroyBlockParticle implements Particle{ - /** @var int */ - protected $data; + /** @var Block */ + private $block; public function __construct(Block $b){ - $this->data = $b->getRuntimeId(); + $this->block = $b; } public function encode(Vector3 $pos){ - return LevelEventPacket::create(LevelEventPacket::EVENT_PARTICLE_DESTROY, $this->data, $pos); + return LevelEventPacket::create(LevelEventPacket::EVENT_PARTICLE_DESTROY, $this->block->getRuntimeId(), $pos); } }