mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 19:28:55 +00:00
TNT now ignites when hit by a burning projectile
This commit is contained in:
parent
eafc23c756
commit
d0067cfac5
@ -29,10 +29,12 @@ use pocketmine\entity\Entity;
|
||||
use pocketmine\entity\Location;
|
||||
use pocketmine\entity\object\PrimedTNT;
|
||||
use pocketmine\entity\projectile\Arrow;
|
||||
use pocketmine\entity\projectile\Projectile;
|
||||
use pocketmine\item\Durable;
|
||||
use pocketmine\item\enchantment\VanillaEnchantments;
|
||||
use pocketmine\item\FlintSteel;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\RayTraceResult;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\utils\Random;
|
||||
@ -138,4 +140,10 @@ class TNT extends Opaque{
|
||||
public function onIncinerate() : void{
|
||||
$this->ignite();
|
||||
}
|
||||
|
||||
public function onProjectileHit(Projectile $projectile, RayTraceResult $hitResult) : void{
|
||||
if($projectile->isOnFire()){
|
||||
$this->ignite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user