If you’re a newbie Minecraft modder, you may often find yourself looking for some helpful article on a certain modding aspect, whether it be block states, JSON
files, the OreDictionary
, or whatever it is that you would like to know more about. Unfortunately, there isn’t really any central place on the internet that serves as a hub for all modding tutorials/articles/how-tos, and especially not for the latest version. This can be quite a problem, and it can make learning to mod rather difficult.
Over the course of many days spent working on my mod, Colore, I’ve found quite a few good articles on various Minecraft Forge modding topics that should be pretty helpful if you’re just starting out or want to learn about a part of modding that you haven’t explored yet. I would like to point out, though, that you do need to have at the very least a decent understanding of how programming works, as well as some of the particular things about the Java programming language that are important to know. You should also already have an understanding of various basic Minecraft concepts like metadata, tile entities, chunks, and the distinction between blocks, items, and entities. So, here is my list of various helpful resources for learning how to make Minecraft mods. Some of these are tutorials, some are articles explaining how Minecraft and Forge work, and some are code examples. Most of these should be at least mostly up-to-date for 1.9.4, though several were written for older versions, so keep in mind that some things may have changed names and/or been revised to work in a different way since the article was written.
The official MinecraftForge Documentation: While very short and not very extensive (and also slightly out-of-date as it hasn’t been updated much since 1.8), this is a good source of basic Forge info such as how to setup your development workspace, an explanation of the block states JSON
formats, some guidelines for structuring your mod’s code, and some other helpful info for beginners.
The Temporal Reality Modding Knowledge Base wiki: Here’s a really neat series of tutorials that should cover pretty much all the basics of modding in 1.9.4, as well as 1.8.9, should you decide to backport your mod to that version.
Shadowfacts’ Forge modding tutorials: Another good series of modding tutorials. I would recommend reading both this and the above series to get two slightly different views on how to do the basics… remember that this is programming, and there are many ways to organize your code and accomplish the same thing. All the ways shown in various tutorials will end up calling the same Forge/Minecraft methods in the end, but it’s up to the modder to choose how to organize his code to do it in the most efficient, clean, readable, and modular way possible.
Choonster’s description of the model-loading process: This is a very helpful article on how model-loading works as of 1.9/1.9.4, which is one of the main differences from 1.8/1.8.9, so this is a good complement to older articles/tutorials written for those older versions or to help modders who have coded for 1.8.x but not 1.9.
GreyMinecraftCoder’s guide to how Forge works: Although it hasn’t been updated since 1.8, this is still a very very helpful resource (and still mostly up-to-date except for some method-changes/renames and some changes to model-loading in more recent versions) for understanding all basic Forge concepts like events, model/texture-rendering, how Forge runs your code, and various other important topics. Unlike most tutorials you’ll find online, this is actually more like a series of encyclopedia articles, actually explaining how everything actually works rather than just being a set of fool-proof instructions that don’t actually teach you anything.
TheGreyGhost’s MinecraftByExample: A picture is worth a thousand words, and a mod full of example code for various kinds of blocks, items, tile entities, and more is worth a thousand questions. One of the best ways to learn how Forge and Minecraft code works is to study working examples and try and figure out how and why they work. (But don’t copy-and-paste, as you’ll learn nothing and you won’t progress in your understanding of modding at all.) This is a really great example mod that should help if you’ve run into a problem with your mod and you wish you had an example to study of something similar to what you want to do. It is currently written for 1.8.9, but will probably be updated to 1.9.4 soon.
The Forge Forums: When all else fails, this is the go-to place for solving modding problems. Often you can find an existing topic already covering a problem you’re experiencing, and a quick search is generally all that is needed to find an answer to most problems you’re having. It’s also a good learning experience to just read the various posts that come up concerning various topics, as you can pick up a good bit of understanding of how Forge works simply by reading through past discussions. Finally, here are some helpful tips:
- Whenever the game crashes, ALWAYS read the crash logs. 90% of the time you can find the exact line of code that is flawed by reading the crash logs, and you can easily discover just what exactly is crashing the game. Sometimes it’s trying to reference objects that haven’t been initialized yet, sometimes it’s trying to access info you don’t have access to, sometimes it’s doing silly things like trying to pass items as parameters to a function that takes blocks, but whatever the problem is, you can almost always find out what you’re doing wrong simply by analyzing the crash log and walking through your code to discover any logical errors you’ve made.
- Don’t copy-paste code from tutorials. As tempting as this is, you should always take the time to read and analyze the code you see in tutorials so you understand HOW and WHY it works, so you’ll be able to do it on your own without constantly referencing a tutorial. Manually typing out the code can help you to remember how to do something and understand it better as well, as it causes you to think about the code more.
- Study the Minecraft and Forge classes. Reading the source code is one of the best ways to learn how something works… not only in Minecraft modding, but in programming in general. You can often discover where functionality originates from and how to hook into and/or extend that functionality to use in your mod by simply looking around in the code for something similar to what you’re working on. For example, if you want to understand how slabs work, look at the
BlockSlab
,BlockHalfSlab
,BlockDoubleSlab
, andItemSlab
classes to see what they do, and try and figure out which methods you would need to override and which classes you would need to extend in order to make your own. - Before asking a question, make sure someone else hasn’t already answered it. For most basic modding problems, the answers are already on the Forge Forums on an existing topic, because chances are that someone else has already had your problem before. You don’t want to your time or other people’s time asking a question that you could have found the answer to yourself. Always check the Forge Forums and Google before asking for help, to make sure that the help you need isn’t already out there.
- 95% of the problems you encounter in programming will be stupid little mistakes that will make you want to bang your head against a wall. Be prepared to search for hours and hours for the cause of a problem, only to discover it was all because of something silly like typing a “1” instead of an “i” or forgetting to actually call a method you’ve created. Try not to get discouraged, and take a break if your brain feels exhausted… a good night’s rest and a refreshed mind can help to solve many problems.
I hope this post has been helpful to any new Minecraft modders out there! These resources have definitely been very helpful in my modding experience, and I hope they will be useful in yours as well!
The post A Helpful List of Minecraft 1.9.4 Modding Resources appeared first on SuperGeniusZeb.