Setting up a Minecraft Forge server – Minecraft Wiki

If you’re interested in learning how to set up Minecraft Forge and manage your mods, check out the tutorial below. Once you get going, you’ll have a place to keep track of all your mods, whether those involve modifying your interface or enhancing your exploration.

Despite the fact that it has been around for more than ten years and is one of the best PC games of all time and one of the best sandbox games, Minecraft mods are just one of the things that keep players coming back. Forge mods are plentiful, and there are plenty of them for Minecraft as well, so managing them can be a little overwhelming. If you’re not living your best modding life on the original PC version, then there’s plenty of fun to be had exploring Minecraft PE seeds to keep you occupied for hours. However, Minecraft Forge only supports the Java Edition.

For managing all of your compatible mods, Minecraft Forge is an excellent tool if you do have the Java Edition. It can be a little intimidating when approaching it for the first time. Don’t worry though, we’ve made a simple, step-by-step tutorial for installing Forge in Minecraft so you can quickly and easily change how it works.

You can now use Minecraft Forge to access the “Mods” folder and add all of your favorite add-ons to the game.

Game Pass for PC Game Pass for PC Microsoft $9. Network N receives commission from eligible purchases made through Microsoft and other programs for 99 cents ($1 for the first month).

You can organize, manage, and keep track of all your mods in Minecraft Forge. If you need more ideas, check out our list of the top Minecraft shaders and texture packs, which bring a lot of visual flair to the blocky world. We have a guide to Minecraft ideas that will provide you with a ton of intriguing ideas to try out for the first time if you’re stuck for what to build in the game.

Things not to do

When creating a mod, there are a few things you should be careful not to do. Keep this list in mind:

  • Don’t do anything that violates the Minecraft terms of use published by Mojang Studios.
  • Release no versions or modifications of Minecraft that enable play without owning the original game from Mojang Studios.
  • Do not in any way make the decompiled source code for Minecraft available.
  • Dont modify existing mods without permission from that mods author(s). Check their License, usually available in the authors GitHub repository. You do not have permission to share a modified version with anyone if you cannot locate the license. You may tinker with the files for personal use only.

First steps with Forge

This wiki article aims to provide a foolproof walk-through of a few key elements of Forges tutorial: Bookmark their page, as it addresses many issues this article will not. Moreover, theres more than one valid way to achieve the desired result; this wiki article will focus on the simplest, which is probably not the most efficient or elegant. If you follow precisely the steps outlined here, you should soon have a functional mod, which you can then tinker with to your hearts content. If you use Linux, Forges tutorial will probably be more useful for you. If you use Windows, read on.

A note about placeholders

In this tutorial, “You” refers to the User profile you are currently logged in as; if you copy-paste any of the paths, make sure to change “You” to your own Windows username. In this tutorial, “yournewmod” will be used to represent sections that you should replace with the project’s chosen mod name.

Create a folder for your project

Navigate to C:/Users/You/Documents and create a new folder. The name of this folder may be changed easily later.

Obtain a “source distribution”

Visit and make sure the version selected is the version for which you want to create a mod. In the large “Download Recommended” box, click on the small MDK box. A dialog box will appear, asking where you want to save the file, and what to name it. Choose any convenient location, but leave the name unchanged.

Copy key files to your project folder

Open the forge-1. 16. 5-. -mdk folder (with or without first unzipping it) and paste the subsequent 5 files into the project folder you made in the preceding step: [more information needed]

  • the src folder
  • the gradle folder
  • gradlew
  • gradlew.bat
  • build.gradle

3½. A note about mappings

Although class names are different for technical reasons, there are two different sets of mappings available for method names: “MCP” community-based mappings and “Official” mappings based in part on the official Obfuscation maps. Although the official mappings have recently replaced the MCP mappings as the default in the MDK, function parameter names are still not available in the official mappings for this tutorial.

Change the following line in build.gradle line 34

On line 51 of ExampleMod. Java users should switch options to gameSettings (or just comment out or remove the line).

Import the gradle project

Open/Run the IntelliJ IDEA program. In the landing screen, click on Open. A dialog box will appear, asking which file to import. Navigate to your project folder and select “build.Gradle,” then click OK.

Designate the JDK

In the next window, click in the “Gradle JVM” field and navigate to the JDK files you installed earlier. If you got version 8 update 282, select the folder named “jdk1.8.0_282.” Click OK and wait for the build to finish, Showing the results in the bottom field.

[TODO: I need to confirm what happens on a brand-new IDEA install because I didn’t get another window]

[Note: Confirming that on IntelliJ IDEA 2021. 1. If the 2 window does not appear, it is likely because the JDK is already detected; it will only do so if the proper JDK could not be found.

Set up workspace

No Dependencies needed to be Installed. As the Forge command setupDecompWorkspace has not changed, move on to the next step.

Configure Run settings

Double-click the “genIntellijRuns” entry in the “fg_runs” folder after gradle has been refreshed. By doing this, new run configurations that enable the use of your mod will be created. Next, open the Run settings’ “Edit configurations” window and scroll down to about halfway down to find “Use classpath of module.” Select the option that concludes with by clicking the drop-down box for it. main, then click Apply. If you just finished changing the settings for the Minecraft Client, click the Minecraft Server button and follow the instructions to change the classpath. [TODO: Is this necessary anymore? It was already set].

Now, choose runClient from the run configuration drop-down menu, and click Run. This will start the Launcher with your mod included. You can verify that your mod is there when you reach the landing menu.

Creating a mod for Forge

The project is referred to as “examplemod” and has the package name “com” as it was delivered with the MDK. example. examplemod”. In the following locations, you must rename this to your own names: rename the class files; build gradle – META-INF/mods. toml.

If you don’t own a domain name, package names should be based on a domain name in reverse or a name that isn’t a valid domain name.

[TODO clearer instructions, set up MODID variable]

Setting up Item Registration

You can create a class to put your definitions in. Although you could theoretically just add it to the main class, we refer to it here as ModItems. Better organization for when you expand your mod comes from having at least one class file (or, ideally, a package) to put registrations in without any code unrelated to registrations.

Firstly, create a DeferredRegister of type Item. In essence, this is a list used to register items. Then, create a RegistryObject as displayed below in order to register an item.

If you want to add more options add . [dot] at the end of ,, CreativeModeTab. TAB_MISC) “.

Once finished, register the item in your item class as follows:

then incorporate the following code into your main class’ constructor:

or you can do with this code below.

Create a public ExampleMod() constructor in your main class and configure it to automatically be called at the appropriate moment.

And now you need to translate this item. Create a directory called assets inside resources, then add lang inside of that.

JSON and Texture Files

resourcesassetsexamplemodlangen_us.json (<- en_us.json is the language)

inside en_us.json write:

the item. examplemod. The name you enter inside the ModItems class [where your items are] must match ITEM_NAME.

Item Model File

Inside add the following.

item/generated is the default with no special features for rendering.

Texture File

This is where you should add your texture file.

Creating a Custom Block

Create a new block-type DeferredRegister first, which will be used to register any blocks. Make sure to import net. minecraft. block rather than any of the other options.

The method must then be registered with the IEventBus parameter. Add the following method to your ModBlocks class if you have one; otherwise, add it to your register method, which already exists.

Add the following two helper methods to your class to quickly create blocks. registerBlock registers the block while registerBlockItem registers the associated item.

Finally, add the register call to your main class like you did with the items.

Registering the Custom Block

The following code shows how to add a simple block.

Blockstates JSON

resourcesassetsexamplemodlangen_us.json (<- en_us.json is the language)

Block Model JSON

Put your texture here.

Creating a Custom Tool

Let’s create a straightforward spear with stone sword-like damage capabilities.

Therefore, in order to get started, we must create a new directory in your package called tools. Next create a new Java enum called ModItemTier. You must enter one of the following in this file:

Next, you need to register your item. Create a new item similar to this one in your item registry class:

The values chosen for the example are halfway between a sword and an axe; the numbers represent the base attack damage [added to the damage set in the ItemTier] and the speed modifier.

Then, create a JSON file with the name you specified earlier in src/main/resources/assets/examplemod/models/item as follows:

Then, go to your textures folder and input the texture you will make in the next step. If you want to know more about durability I recommend this page.

Custom Layers over Vanilla Textures

Create a new document in an editor, ideally one that supports transparency, with a size that is a multiple of 16×16 (e.g. 32×32, 64×64. etc. ).

This example is using a 32×32 pixel and is made in GIMP.

When creating your file, be sure to use pixels rather than inches, millimeters, or any other unit of measurement.

Create a new layer, and delete the original canvas. If you don’t do that, your background will be white.

Using a brush of 1×1 pixel, start drawing your item. Use distinct layers for different parts of the item to make it easier to make changes.

When youre done creating your art, press file to save. It won’t save as a file if you’re using GIMP or another sophisticated editor. png. For GIMP, it saves as a . xcf.

Press ctrl-e for Windows or E for macOS to access the export dropdown. This is to export the file. Make sure you export as a . png, not a . jpg or any other file extension. If it is not saved as a . png, it will appear incorrect and have a white background.

You can download this finished pixel art here if you’re following this tutorial and want to use it.

Creating a Custom Mob

The best way to model mobs is probably blockbench (blockbench website). Blockbench is a free modeling tool, and it would be much faster and easier than taking the other approach, which is slow. If you want to model with it, simply make a cube, position it, rotate it, size it, and make your model the way you want to make it. If you need more cubes, you can easily make a new one. This is probably the best method for this. It is fast, easy, and customizable.

Creating a Config file

To build your mod, run gradlew build or ./gradlew build for macOS. This will output a file in build/libs with the name [archivesBaseName]-[version].jar. This file can be placed in the mods folder of a forge enabled Minecraft setup, and distributed. Then you can upload your mod to CurseForge or Modrinth.

Further Reading


See also

Minecraft | How to Build a Simple Starter Forge | Starter Build for Minecraft 1.17 Caves and Cliffs


How do you make a blacksmith forge in Minecraft?

If you enjoy playing games with mods enabled, you should install the free, open-source server known as Minecraft Forge. It was created with the goal of making Minecraft: Java Edition compatible with user-created mods.

Is Minecraft Forge Free Minecraft?

Forge is a modding API. Between our code and Minecraft itself is a layer called Minecraft Forge, or simply Forge. We can’t directly request that Minecraft add items or carry out particular cool things. Due to the need for an API (application programming interface), Minecraft must be able to handle our logic.

Is forge a mod in Minecraft?

1. Start by connecting to your server to learn how to make a mod for Minecraft. then click Play. Modify. Then a mod is made. You can now begin coding. Complete the rest of the mod’s code. Start your mod!.

Leave a Comment