mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Merge branch '3.5' into 3.6
This commit is contained in:
commit
6b51bf4a80
@ -25,6 +25,8 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
use pocketmine\entity\projectile\Arrow;
|
use pocketmine\entity\projectile\Arrow;
|
||||||
|
use pocketmine\item\Durable;
|
||||||
|
use pocketmine\item\enchantment\Enchantment;
|
||||||
use pocketmine\item\FlintSteel;
|
use pocketmine\item\FlintSteel;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
@ -51,8 +53,10 @@ class TNT extends Solid{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onActivate(Item $item, Player $player = null) : bool{
|
public function onActivate(Item $item, Player $player = null) : bool{
|
||||||
if($item instanceof FlintSteel){
|
if($item instanceof FlintSteel or $item->hasEnchantment(Enchantment::FIRE_ASPECT)){
|
||||||
$item->applyDamage(1);
|
if($item instanceof Durable){
|
||||||
|
$item->applyDamage(1);
|
||||||
|
}
|
||||||
$this->ignite();
|
$this->ignite();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user