Hi i have problem with new nbt i have this code but not work Code: $nbt = new CompoundTag(); $nbt->Pos = new ListTag("Pos", [new DoubleTag("", $player->getX()), new DoubleTag("", $player->getY()+5), new DoubleTag("", $player->getZ())]); $nbt->Motion = new ListTag("Motion", [new DoubleTag("", 0), new DoubleTag("", 0), new DoubleTag("", 0)]); $nbt->Rotation = new ListTag("Rotation", [new FloatTag("", 0.0), new FloatTag("", 0.0)]); $entity = Entity::createEntity("entita2", $player->getLevel(), $nbt); $entity->setDataFlag(Entity::DATA_FLAGS, Entity::DATA_FLAG_LEASHED, true); $entity->setDataProperty(Entity::DATA_LEAD_HOLDER_EID, Entity::DATA_TYPE_LONG, $player->getId()); $entity->spawnToAll(); $nbt->TileID = new IntTag("TileID", 35); $nbt->Data = new ByteTag("Data", mt_rand(1, 15)); $gadget = Entity::createEntity("entita", $player->getLevel(), $nbt); $gadget->spawnToAll(); Please help me
Use $entity = new pocketmine\entity\Human(Level $level, CompoundTag $nbt); instead of Entity::createEntity