NBT is no longer needed to create an entity

it's still able to be provided, but shouldn't be needed in the majority of cases (constructor args and/or API methods should be sufficient).
This commit is contained in:
Dylan K. Taylor
2020-06-19 09:49:06 +01:00
parent 0a1bb0041b
commit 4b528aa637
14 changed files with 19 additions and 24 deletions

View File

@ -32,7 +32,6 @@ use pocketmine\item\enchantment\Enchantment;
use pocketmine\item\FlintSteel;
use pocketmine\item\Item;
use pocketmine\math\Vector3;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\player\Player;
use pocketmine\utils\Random;
use function cos;
@ -95,7 +94,7 @@ class TNT extends Opaque{
$mot = (new Random())->nextSignedFloat() * M_PI * 2;
$tnt = new PrimedTNT(Location::fromObject($this->pos->add(0.5, 0, 0.5), $this->pos->getWorldNonNull()), new CompoundTag());
$tnt = new PrimedTNT(Location::fromObject($this->pos->add(0.5, 0, 0.5), $this->pos->getWorldNonNull()));
$tnt->setFuse($fuse);
$tnt->setMotion(new Vector3(-sin($mot) * 0.02, 0.2, -cos($mot) * 0.02));