mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 03:35:33 +00:00
parent
82c8fa696a
commit
5392ddf0b9
@ -34,6 +34,7 @@ use pocketmine\item\Item;
|
|||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\utils\Random;
|
use pocketmine\utils\Random;
|
||||||
|
use pocketmine\world\sound\IgniteSound;
|
||||||
use function cos;
|
use function cos;
|
||||||
use function sin;
|
use function sin;
|
||||||
use const M_PI;
|
use const M_PI;
|
||||||
@ -101,6 +102,7 @@ class TNT extends Opaque{
|
|||||||
$tnt->setMotion(new Vector3(-sin($mot) * 0.02, 0.2, -cos($mot) * 0.02));
|
$tnt->setMotion(new Vector3(-sin($mot) * 0.02, 0.2, -cos($mot) * 0.02));
|
||||||
|
|
||||||
$tnt->spawnToAll();
|
$tnt->spawnToAll();
|
||||||
|
$tnt->broadcastSound(new IgniteSound());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFlameEncouragement() : int{
|
public function getFlameEncouragement() : int{
|
||||||
|
@ -35,7 +35,6 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataFlags;
|
|||||||
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
|
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
|
||||||
use pocketmine\world\Explosion;
|
use pocketmine\world\Explosion;
|
||||||
use pocketmine\world\Position;
|
use pocketmine\world\Position;
|
||||||
use pocketmine\world\sound\IgniteSound;
|
|
||||||
|
|
||||||
class PrimedTNT extends Entity implements Explosive{
|
class PrimedTNT extends Entity implements Explosive{
|
||||||
|
|
||||||
@ -73,8 +72,6 @@ class PrimedTNT extends Entity implements Explosive{
|
|||||||
parent::initEntity($nbt);
|
parent::initEntity($nbt);
|
||||||
|
|
||||||
$this->fuse = $nbt->getShort("Fuse", 80);
|
$this->fuse = $nbt->getShort("Fuse", 80);
|
||||||
|
|
||||||
$this->broadcastSound(new IgniteSound());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canCollideWith(Entity $entity) : bool{
|
public function canCollideWith(Entity $entity) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user