Many thanks to the following people:

gitovt - code troubleshooting
kcin2001 - code troubleshooting
orion0333 - code troubleshooting
shulker_forretress - provided base datapack

And you, for downloading! Enjoy.

-W