![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Minecraft Modding, Redux
An update to my original Minecraft Modding post, focusing on 1.13/1/14 modding and later. Refer to the older post for older versions of Minecraft. The old one got a bit unwieldy for updates.
Not all modding tutorials are useful. Some are outdated, and some were written by people with a shaky grasp on Java, how Minecraft works internally, the MinecraftForge source, or all three. A lot of them are uninformative, because the authors start at the beginning and never get to advanced topics, so you have a lot of tutorials on how to make a basic block, but very few (if any) on how to add new crops or render entities or add new crafting interfaces.
Important Tools
I'm not going to bother to list the Java JDK. If you don't already know why you need that or how to get it, you're not going to get very far trying to mod.
- Minecraft Forge - this is the Forge file server, get your modding source and user installation files here.
- Gradle documents - build system used by Forge.
- ForgeGradle - plugin for Gradle used to build Forge. Learn it. Good chance this is out-of-date, but haven't found documents for the newer version yet.
- Eclipse - I used to use Eclipse as my Java IDE; other people use IntelliJ/IDEA. I found it too buggy.
- GitHub - a free, public source code repository. Distributed version control plus offsite backups. This will save your sanity the day your hard disk crashes and wipes out your development directories.
Java
Note that any library tagged 'used by MinecraftForge' is a guaranteed available API that your mod can use, too. Some of the features provided are pretty nifty. TODO: update
- The Java Tutorials, for people who need to get up to speed on their Java, or need a refresher. For Java 8, which is the version Minecraft uses.
- University of Helsinki's Java Programming Course - a free, university-level course
- Java "Back to Basics" Tutorials
- Java 8 API
- Guava - Google Core Libraries for Java; used by MinecraftForge. Lots of useful stuff in here.
- Log4j 2; used by MinecraftForge. Used for log management.
Tutorials and Modding Tips
Personally, I don't like video tutorials for programming. One, the text on the screen is nearly impossible to read because of compression artifacts, small screens, and rapid movement. IF I pause the video, make sure YouTube is sending me it in HD resolution, and switch to full screen mode, I might be able to read your example code. That's a lot of work for something that is as important as reading the code you are teaching me to write, plus it's very distracting to understanding what you are saying for me to have to pause the video repeatedly. Also, if you have a heavy accent, I have trouble following along with my impaired hearing. Finally, droning on about code on the screen makes for extremely boring videos.
It's much easier and more sensible to present your tutorials in text mode, which I can take in at my leisure, and actually read, and you can prune out all the boring, uninformative parts. Please do make tutorial code available for study on GitHub. Sometimes I need to understand how your code fits into the big picture, rather than just see the little bit in code snippets.
1.17 Modding Tutorials, Tips & Techniques
Oh look, everything's broken again!- Gigahertz's 'Simple Steps on how to update from 1.16.5 to 1.17.1 - remapping and fixing up gradle settings. Actual porting not covered here.
- SizeableShrimp's Classname Remapper and instructions. Necessary if porting a code-base from 1.16.5 to 1.17.1.
Changelog notes on Tool system changes- Superceded by:Explanation of the new tool system - Gigahertz fixed up his notes into a proper article.
1.16 Modding Tutorials, Tips & Techniques
- My notes on 1.15.2 to 1.16.1 changes
- Much of 1.15 still applies. However, more has changed from 1.15.2 to 1.16.1 than changed between 1.14.4 and 1.15.2. And then there was the complete worldgen-breaking changes between 1.16.1 and 1.16.2+
- CurseForge now acts as a Maven repo. Instructions here, near the bottom of the API docs. There's also CurseMaven, an intermediary website that adds some functionality to CurseForge's maven interface. I'm not sure I like a deliberate man-in-the-middle intermediary by someone I don't know anything about, yet.
- McJty's highly-recommended YouTube Tutorials & GitHub source. Continues to update for 1.15/1.16.
1.15 Modding Tutorials, Tips & Techniques
- Forge Documentation - still a work in progress as of today.
- McJty's highly-recommended YouTube Tutorials & GitHub source. Originally for 1.14 modding, but applies to 1.15 as well.
- Data generation: some documentation, a test case, and an actually useful implementation example in Botania.
- Caddieboo's Tutorials for 1.15 and Example-Mod GitHub source code.
- WillieWillus 1.15 update primer - mostly just rendering.
- How-to use global loot function modifiers in Minecraft Forge - my neatly-typed version of Draco18s' Discord chat on the matter
- TheGreyGhost's Minecraft by Example GitHub. Still a work-in-progress; has branches for older versions of Forge/Minecraft.
- Botania source. Makes extensive use of custom recipes and just about everything else. E.g., loot table inject here.
- mods.toml documentation & example
- TTerrag's Lang2Json converter
1.13/1.14 Modding Tutorials, Tips & Techniques
- WillieWillus 1.13/1.14 update primer - the starting point for all the breaking changes to Forge modding. READ THIS!
- Caddieboo's Tutorials and Example-Mod GitHub source code.
- WillieWillus Capabilities Primer.
- 1.14 Update and future protocols - Lex Manos had the modder community vote on proposed changes to naming schemes in the API. Some significant changes that break everyone's old code were approved.
- Custom Ore Generation. Note that this has changed AGAIN in 1.15; this article is only for 1.14.
- Some Early Comments on 1.13 WorldGen
- Containers and GUIs
- McJty's YouTube Tutorials. Not just YouTube, has text and GitHub source. Also good for 1.15
Community and Information
Forums
- Minecraft Forum: Modification Development - ask and answer questions about mod development
- Minecraft Forums:Mapping & Modding Tutorials - quality is all over the map. See the Tutorials section above for specific useful tutorials.
- Minecraft Forge Forums. Read the FAQ/EAQ before posting anything, and tread lightly. The heavy-duty Forge programmers here are very knowledgeable, but expect you to have done your homework before seeking help. They do not suffer fools gladly. Subforums of interest:
- Modder Support - go here for help in developing your mod.
- Support & Bug Reports - go here for problems with Forge itself.
Information Resources
- Minecraft Wiki - a useful repository of vanilla Minecraft information.
- How to summon a loot chest -- for example, to test loot table changes
- Pre 1.13:
/setblock ~ ~ ~ minecraft:chest 0 replace {LootTable:"minecraft:chests/simple_dungeon"}
- 1.13 and later:
/setblock ~ ~ ~ minecraft:chest replace
/data merge block ~ ~ ~ {LootTable:"minecraft:chests/simple_dungeon"}
- Pre 1.13: