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

@ -31,7 +31,6 @@ use pocketmine\block\VanillaBlocks;
use pocketmine\entity\Location;
use pocketmine\entity\object\FallingBlock;
use pocketmine\math\Facing;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\utils\AssumptionFailedError;
use pocketmine\world\Position;
@ -57,7 +56,7 @@ trait FallableTrait{
$block = $this;
if(!($block instanceof Block)) throw new AssumptionFailedError(__TRAIT__ . " should only be used by Blocks");
$fall = new FallingBlock(Location::fromObject($pos->add(0.5, 0, 0.5), $pos->getWorldNonNull()), $block, new CompoundTag());
$fall = new FallingBlock(Location::fromObject($pos->add(0.5, 0, 0.5), $pos->getWorldNonNull()), $block);
$fall->spawnToAll();
}
}