mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
explosion sound will be played even if explosions are disabled
This commit is contained in:
parent
07df9c617a
commit
940797b16f
1 changed files with 7 additions and 0 deletions
|
|
@ -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", [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue