dragoness_e: (Sinhika)
Dragoness Eclectic ([personal profile] dragoness_e) wrote2021-08-13 07:07 pm

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

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!

1.16 Modding Tutorials, Tips & Techniques

1.15 Modding Tutorials, Tips & Techniques

1.13/1.14 Modding Tutorials, Tips & Techniques

Community and Information

Forums

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"}
  • MinecraftForge source - the GitHub repository for the Forge API.
  • TODO - links from Linux side

  • Post a comment in response:

    This account has disabled anonymous posting.
    If you don't have an account you can create one now.
    HTML doesn't work in the subject.
    More info about formatting