Tutorial/Documentation about adapting a data pack into a mod?

I've adapted mine into a mod using some json files: fabric.mod.json, quilt.mod.json, changing the extension to .jar and it works fine in 1.21.4+.

But I'm encountering some problems trying to add support for older versions. I did this just by copying other "data pack mods".

I couldn't find tutorial nor documentation.

So it would be great if there is any documentation about it.

Continue to help post