This commit is contained in:
Dylan K. Taylor 2024-12-04 16:26:40 +00:00
parent 241e356780
commit 8245fa35f6
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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)
);
}
}