explosion sound will be played even if explosions are disabled

This commit is contained in:
GameHerobrine 2023-01-25 20:31:19 +03:00
parent 07df9c617a
commit 940797b16f

View file

@ -36,6 +36,13 @@ class Explosion{
$damage = (int) (($impact * $impact + $impact) * 8 * $this->size + 1);
$entity->harm($damage, "explosion");
}
$pk = new ExplodePacket; //sound fix
$pk->x = $this->source->x;
$pk->y = $this->source->y;
$pk->z = $this->source->z;
$pk->radius = $this->size;
$pk->records = [];
$server->api->player->broadcastPacket($this->level->players, $pk);
return;
}
if($this->size < 0.1 or $server->api->dhandle("entity.explosion", [