When you learn to write software two things are generally occuring:
- You are learning a computer language and it's frameworks (Java, Java SDK, etc.)
- You are learning to design computer software (when to use a Set over a List, best way to lay out class structures, etc.)
From what I have seen with beginning modders is they trip over the second one quite a bit which is a cool thing. The reason it is cool is that you learn to write good software by doing and making mistakes. Over my career as a software engineer I have made some doozy of mistakes, and I have learned quite a bit. And I am still learning because software design is an ever evolving field.
As it applies to Minecraft modding be prepared to get a lot of opinions as to the best way to do things. Some of it will be good advice, a lot of it will be just opinion. In the end you will have to be satisfied with what you produce, and that is what will ultimately count.
Don't be afraid to ask questions. I tell the software devs I am responsible for the only stupid question is the one that remains unanswered. If you do have a question it's best to ask for the place to start looking for a solution and not for *the* solution. Problem solving is a journey. If you short circuit that journey the chance you will learn something is pretty remote.
As it relates to Forge be prepared to spend time digging. For complex situations Forge is not well documented. The best way to figure Forge out is to look at what others have done with their mods. This will require time studying since you are starting out, but as you gain experience you get a feel for code and know where to start looking. Copy/paste of existing code can be OK *if* you understand what that code does. I personally have seen folks copy/paste code without understanding and as a side effect create more problems for themselves.
Lastly, there are a lot of good mod tutorials that can be found by searching the Internet. Also, there are a lot of bad ones that basically say "put this code here" and not really explain what is going on. Once you get started writing a mod you quickly learn what is valuable.
EDIT:
Some more things to keep in mind...
- Embrace iterative development. Do a little design, write a little code, test the heck out of it before moving on to the next piece of code.
- Be mindful that your mod may run on a server. If your core mod logic relies on software pieces that are client side ONLY it will crash the server. (It's why you see those @SidedOnly annotations in the source code.)
- Less is more. Keep things simple, both from a coding standpoint and feature standpoint. Only make things more complicated if there is a darn good reason. Stability is king.
- Your mod is just a piece of the software stack running on a modded client/server. Do your best to make it a good citizen.