mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +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\Location;
|
||||||
use pocketmine\entity\object\PrimedTNT;
|
use pocketmine\entity\object\PrimedTNT;
|
||||||
use pocketmine\entity\projectile\Arrow;
|
use pocketmine\entity\projectile\Arrow;
|
||||||
|
use pocketmine\entity\projectile\Projectile;
|
||||||
use pocketmine\item\Durable;
|
use pocketmine\item\Durable;
|
||||||
use pocketmine\item\enchantment\VanillaEnchantments;
|
use pocketmine\item\enchantment\VanillaEnchantments;
|
||||||
use pocketmine\item\FlintSteel;
|
use pocketmine\item\FlintSteel;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
|
use pocketmine\math\RayTraceResult;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\utils\Random;
|
use pocketmine\utils\Random;
|
||||||
@ -138,4 +140,10 @@ class TNT extends Opaque{
|
|||||||
public function onIncinerate() : void{
|
public function onIncinerate() : void{
|
||||||
$this->ignite();
|
$this->ignite();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onProjectileHit(Projectile $projectile, RayTraceResult $hitResult) : void{
|
||||||
|
if($projectile->isOnFire()){
|
||||||
|
$this->ignite();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user