mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-29 14:49:59 +00:00
DestroyBlockParticle: keep block reference around instead of runtimeID
we'll need this for protocol abstraction
This commit is contained in:
parent
1de5d35dfc
commit
f755ea6043
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user