How to add a block by editing source code? (NOT custom)

read the title

how to do it in a new cat tho

Just change the category name.

And (as I'm assuming is also explained in the document) modify SpriteMorph.blockTemplates() a tiny bit for it to show up in the palette.