I was following a tutorial about how to create Minecraft mods (yeah, I'm pretty new into this, although I know the basics of Java) and I came through an issue: the guide itself hadn't been updated since 1.8, and it appears that now registering blocks and items has changed, since GameRegistry.registerBlock doesn't seem to work anymore (I get the error "The method registerBlock is undefined"). I've tried to look up into Forge, but it's honestly quite complicated and it doesn't give me any examples. Could anyone help me figure out what do I exactly have to input?
If you could give me a .java file of an example block written in 1.12.2 Forge, that'd be amazing. Otherwise, forgive me if I'm asking too much.