Minecraft Blogs / Tutorial

How to make your first Minecraft mod -- Part 1

  • 2,666 views, 4 today
  • 16
  • 6
  • 5
barrowisp's Avatar barrowisp
Level 27 : Expert Explorer
35
Mods (short for 'modifications') can modify or add items, blocks, entities, and much more.
Presumably you already have an idea for a mod you want to create. If you simply want to add custom advancements, functions, loot tables, structures, recipes or tags to your game, look into how to make a Data pack, which does not require programming.

Or look into how to make a Resource pack if you simply want to customize textures (colors and designs), models, music, sounds, languages, splashes, fonts, or the end poem.

Or perhaps you want to 'fork' a favorite mod to update for newer versions of Minecraft. In any case, this guide will cover only the most basic elements of creating an item (example: sword) and creating an entity (example: zombie), and distributing the resulting mod package.

Minecraft mods consist of jar files (example: yournewmod.jar) which contain class files, json files, and image files, to name a few of the most common.
  • Class files are specific to programming languages. When making a mod, you will create several classes saved as .java, which will be converted to .class when you compile the mod for use. A few Java tutorials to try include w3schools (web and mobile), SoloLearn (web and mobile), and kodevelopment(web). You will need an IDE (Integrated Development Environment) such as IntelliJ or Eclipse to read or create class files. This tutorial will focus on IntelliJ IDEA Community Edition 2019. (downloading IntelliJ Integrated Development Environment)
  • JSON files are a means of detailing the characteristics of objects used by Java class files. JSON is much simpler than Java. You will need a text editor such as Notepad++ to read or create json files. You probably already have Notepad on your computer, but there are many advantages to using Notepad++ instead.
  • Image files you may be familiar with include .bmp and .jpg formats, but Minecraft requires .png format (example: yournewlogo.png) in multiples of 16 pixels square (example: 16x16, 32x32, 64x64). You will need an image editor such as Paint.NET or GIMP to edit or create .png files. You probably already have MS Paint on your computer, but GIMP has so much more functionality, and Paint.NET is quite user-friendly. There are also several websites with tools for creating pixel art.


    If you have been playing Minecraft Java Edition, you probably already have JRE (Java Runtime Environment). To develop a mod, you will need to find JDK (Java Development Kit), which includes the JRE and an emulator. Create a free account at oracle.com and download JDK Standard Edition version 8. Then follow the instructions for installing it, and make note of the location it installs to. Pay particular attention to the section on Updating the PATH Environment Variable.

    With a Java Development Kit installed, and the IntelliJ Integrated Development Environment to manipulate Java with, you now have the tools to develop custom software that can be used in a variety of applications. While working on a mod, continue working through Java tutorials. The lessons will enable you to put your ideas into action, while the ideas will make the lessons more interesting and memorable.

    One more tool you should set up before starting a mod is the Forge MDK (Mod Development Kit). Forge is a collection of useful resources and mod loader, designed specifically to simplify compatibility between Minecraft Java Edition and multiple community-created mods. This tutorial will focus on the MDK for version 1.12.2 of Minecraft Java Edition; as of this writing, Forge for 1.13 is still in development, while Mojang has already released 1.14.2. To begin developing for 1.14 right away, you may decide to skip the rest of this tutorial about Forge, and instead dig into Fabric. The Forge MDK will be addressed in detail in the next section. (downloading the Mod Development Kit from Forge)



    How to make your first Minecraft mod -- Part 2


    What not to do

    There are some things that you should be careful to not do when creating a mod. Keep this list in mind:
    • Don't do anything that violates Mojang's terms of use for Minecraft.
    • Don't release Minecraft versions or modifications that allow you to play without having bought Minecraft from Mojang.
    • Don't release the de-compiled source code of Minecraft in any way.
    • Don't modify existing mods without permission from that mod's author(s). Check their License, usually available in the author's GitHub repository. If you can't find the license, then you do not have permission to share a modified version with anybody. You may tinker with the files for personal use only.
    CreditThis blog series is nearly identical to the wiki article I'm writing at https://minecraft.gamepedia.com/Tutorials/Creating_Forge_mods
    Tags

    Create an account or sign in to comment.

    1
    08/29/2019 10:04 pm
    Level 7 : Apprentice Crafter
    ECLcrafter
    ECLcrafter's Avatar
    I’ve never seen anyone do this, cool!
    3
    06/11/2019 2:51 amhistory
    Level 26 : Expert Explorer
    ChronoFury
    ChronoFury's Avatar
    There's not that many modding tutorials for beginners out there, so props to you for writing this.

    Though I should point out that the link to part 2 of the tutorial is broken.
    1
    06/11/2019 5:46 pm
    Level 27 : Expert Explorer
    barrowisp
    barrowisp's Avatar
    oooh, I see now that I posted a link to the page where I can edit my blog post. so it works fine for me, but not for anyone who isn't me; thanks!
    2
    06/10/2019 11:56 pm
    Level 9 : Apprentice Scribe
    RacoonMaster
    RacoonMaster's Avatar
    Thanks so much for making this guide.
    1
    06/04/2019 10:18 pm
    Level 27 : Expert Explorer
    barrowisp
    barrowisp's Avatar
    I only started modding a month or so ago. I welcome critiques from experienced modders if I got anything wrong.
    Planet Minecraft

    Website

    © 2010 - 2024
    www.planetminecraft.com

    Welcome