mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
...
This commit is contained in:
parent
241e356780
commit
8245fa35f6
@ -30,7 +30,6 @@ use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemTypeIds;
|
||||
use pocketmine\network\mcpe\protocol\BlockEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\BlockPosition as ProtocolBlockPosition;
|
||||
use pocketmine\world\Position;
|
||||
use pocketmine\world\sound\ShulkerBoxCloseSound;
|
||||
use pocketmine\world\sound\ShulkerBoxOpenSound;
|
||||
use pocketmine\world\sound\Sound;
|
||||
|
@ -119,10 +119,11 @@ final class SurvivalBlockBreakHandler{
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
$vector3 = $this->blockPos->asVector3();
|
||||
if($this->player->getWorld()->isInLoadedTerrain($vector3)){
|
||||
$this->player->getWorld()->broadcastPacketOnBlock(
|
||||
$this->blockPos,
|
||||
LevelEventPacket::create(LevelEvent::BLOCK_STOP_BREAK, 0, $this->blockPos->asVector3())
|
||||
LevelEventPacket::create(LevelEvent::BLOCK_STOP_BREAK, 0, $vector3)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user