TNT: remove the old unreliable way of ignition on burning arrow collide

This commit is contained in:
Dylan K. Taylor 2022-07-14 00:23:12 +01:00
parent d0067cfac5
commit 7dd8876515
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -25,10 +25,8 @@ namespace pocketmine\block;
use pocketmine\data\runtime\RuntimeDataReader;
use pocketmine\data\runtime\RuntimeDataWriter;
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;
@ -103,18 +101,6 @@ class TNT extends Opaque{
return false;
}
public function hasEntityCollision() : bool{
return true;
}
public function onEntityInside(Entity $entity) : bool{
if($entity instanceof Arrow && $entity->isOnFire()){
$this->ignite();
return false;
}
return true;
}
public function ignite(int $fuse = 80) : void{
$this->position->getWorld()->setBlock($this->position, VanillaBlocks::AIR());