A mod for creating anything. Tutorial "From A to Z" Creating a Minecraft plugin

Popularity Minecraft games It’s only growing every year, partly contributed to by the players themselves by developing mods and adding new texture packs. Even an inexperienced user will be able to create his own modification if he uses special programs. In this article, we have selected for you several of the most suitable representatives of such software.

First, let's look at the most popular program for creating mods and textures. The interface is made very convenient, each function is located in a corresponding tab and has its own editor with a set of specific tools. In addition, you can connect additional software, which you will need to download in advance.

As for functionality, MCreator has both advantages and disadvantages. On the one hand, there is a basic set of tools, several operating modes, and on the other hand, the user can configure only a few parameters without creating anything new. To change the game globally, you need to go to the source code and change it in the appropriate editor, but this requires special knowledge.

Linkseyi's Mod Maker

Linkseyi`s Mod Maker is a less popular program, but it provides users with significantly more options than its previous representative. Working in this software is implemented in such a way that you need to select certain parameters from pop-up menus and upload your own images - this only makes the program more convenient and simpler.

You can create a new character, mob, material, block and even biome. All this is combined into one mod, after which it is loaded into the game itself. In addition, there is a built-in model editor. Linkseyi`s Mod Maker is distributed free of charge and is available for download on the official website of the developers. Please note that there is no Russian language in the settings, but even without knowledge of English, it will be very easy to master Mod Maker.

Deathly's Mod Editor

Deathly`s Mod Editor is very similar in functionality to its previous representative. There are also several tabs in which a character, tool, block, mob or biome is created. The mod itself is formed into a separate folder with its component directories, which you can see on the left in the main window.

One of the main advantages of this program is the convenient system for adding texture images. You don't need to draw the model in 3D, you just need to load images of a certain size into the appropriate rows. In addition, there is a built-in modification testing function that allows you to detect errors that could not be identified manually.

There weren’t many programs on the list, but the representatives present perfectly cope with their tasks and provide the user with everything they need when creating their own modification for the game Minecraft.

How to create a mod for Minecraft?

In order to create mods in Minecraft, you must have at least basic knowledge of working with applications and programming in general.

You can create mods for Minecraft using the API or without it. API is an application programming interface that allows you to work with ready-made classes, functions, procedures, structures and constants for use in other programs. The most popular API for Minecraft is Minecraft Forge. Using Forge to create mods in the game requires the use of this API for the game itself, which greatly complicates the game process, but at the same time allows you to install applications without conflicts with your modifications and with the mods of other players. It is impossible to achieve this without an API.

Preparing to create mods in the game is as follows:

  1. Download latest version Java.
  2. Install Java SE Development Kit.
  3. Download Eclipse IDE for Java Developers and place a copy of it on your desktop.
  4. Download Minecraft Forge.
  5. Move all programs into one folder on your desktop and run install.cmd.
  6. After starting Eclipse, specify the folder you created earlier as the workspace.

After this, you can proceed directly to creating the mod. You will need to go through the following steps:

  1. Creating a base file that specifies the name, id and version of the mod;
  2. Creating a block;
  3. Creating a drop;
  4. Block generation;
  5. Creation of versatile structures;
  6. Multiblock structures;
  7. Crafting items;
  8. Creation of tools, etc.

Starting small, you will gradually understand the basic principles of how to create mods for Minecraft, and you will even be able to add your own own mods to the server in order to show them to friends. If creating mods is not up to you yet, read the article

This article describes the process of creating modifications for Minecraft using Forge and Eclipse. You don't need to be a professional to create simple modifications, but at least a mediocre understanding of the principles of the Java programming language is desirable. If you encounter any questions or problems while making modifications that are not covered here, please post them on the talk page.

Readiness table
Lesson 1.6+ 1.7+
Block Ready Ready
Item Ready Ready
Craft Ready Ready
Compilation Ready Ready
Generation Not planned Ready
Proxy and instance Not planned Ready
Mob Not planned Ready
Blocks with model Not planned Maybe
Add. Lessons Total: 2 Total: 12

First steps

Let's do the most important thing first: install Java and Eclipse. Regardless Minecraft versions, for which you want to create a modification, these steps are the same.

Java JDK

The most important thing for writing anything in Java is, naturally, the Java libraries themselves.

You can download them from the Oracle website. Go to this page and click on the Java icon on the left. Scroll down the page that opens a little, select that you agree with license agreement(Accept License Agreement), and select the item corresponding to yours at the bottom of the first list operating system, and download. After downloading, simply install by clicking Next. After installation, you need to enter the installation path into the variables Windows environment. To do this, go to the Computer Properties menu (⊞ Win + PauseBreak or My Computer -> Properties -> Advanced system settings -> Environment variables). Find the Path system variable, highlight it, and click Edit. At the very end of the Value line, add the path to JDK/bin separated by a semicolon, for example, C:\Program Files\Java\jdk1.7.0_45\bin . Then click OK three times.


No need to delete META-INF in minecraft.jar, and minecraft_server.jar
1. Create a folder (For example: MCP Forge) and unpack the contents of the archive with MCP there.
2. Copy the bin and resources folder from the client to the ../MCP Forge/jars/ folder, from the server we only need minecraft_server.jar.
3. Unpack the archive with Forge-src into the MCP Forge folder
4. Open the folder ../MCP Forge/forge/ and run the install.cmd file. We are waiting for the decompilation to finish..
(P.S If you want you to already have a ready-made MCP with Forge, for example, if you accidentally deleted it or something else, then: When the decompilation is completed, launch the game and let it download the lib, and then add this MCP Forge to the archive, for example like this (mcp Forge 1.5.1)
5. “Install” and launch Eclipse, during startup you will be “asked” for the folder with the project, specify the path: ../MCP Forge/eclipse/
6. So, we have opened the project, now (Usually on the left, there is a Package explorer) we look at what library it “eats” (In the Package explorer window, “open Minecraft project" and if there is a line "JRE System Library", then everything is fine, but if the line is "JRE System Library", then right-click (Right mouse button), select the Properties item, then a window opens in it with the Execution environment item, select JavaSE in it -1.7 and click Ok.
7. So, the preparations are ready.

How can you start writing a mod?

First, we need to create a “base”, that is, the main “folder” in which our “base” and everything else will be stored.
1. Go to Eclipse, see the Minecraft folder in Package Explorer, open it, and right-click on the src folder, select New->Package. Open window in the Name line, we indicate the name of the folder in which everything will be stored (For example, take: mods.testmod.src) and click Ok.
2. Right-click on our folder (mods.testmod.src), then New -> Class. In the Name line, indicate the name of our file (For example: TestModBase) and click Finish.
3. Change the path, but do not remove mods, like this, for example mods.NewItemMod.src.
4. In new versions you need to import “A lot” of everything, to do it faster in Eclipse press “ctrl + shift + o”, and it will quickly import everything, and if a window appears then select the import you need.
5. If you do not work in Eclipse, then it will be much more difficult for you, so it is better to switch to it, it will indicate where the error is, and what imports are needed, and you will not ask stupid questions in the comments.

package mods.testmod.src;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.SidedProxy;
@Mod (modid = "TestMod", name = "Test Mod", version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, versionBounds = "1.0.0")

public class TestModBase (

@Instance("TestModID")
public static TestModBase instance;

@Init

{
}

@PreInit
public void preLoad(FMLPreInitializationEvent event)
{
}

@PostInit
public void postLoad(FMLPostInitializationEvent event)
{
}
}


In our TestModBase file
After the inscription:
public class TestModBase (
Enter this line:
public static final Block testBlock = new TestBlock(2020).setUnlocalizedName("testBlock");
Parsing:
public static final Block "testBlock" - testBlock the name of our block in the code (not in the game)
new TestBlock(2020) - TestBlock the name of our block in the code (not in the game), 2020 block ID
setUnlocalizedName("testBlock") - ("testBlock") the name of our block in the code (not in the game)
After the inscription:
@Init
public void load(FMLInitializationEvent event)
{

Enter this line:
GameRegistry.registerBlock(testBlock);
LanguageRegistry.addName(testBlock, "Test Block");

Parsing:
(testBlock) - the name of our block in the code (not in the game)
(testBlock, "Test Block") - testBlock is the name of our block in the code (not in the game), "Test Block" is the name of our block in the game.
Create a file testBlock and enter the following code into it:
package mods.testmod.src;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;

public class TestBlock extends Block (

public TestBlock(int par1)
{
super(par1, Material.ground);//Material
this.setCreativeTab(CreativeTabs.tabTools);//Add to creative
}
//Register the texture
@Override

{
}
}


In our TestModBase file
After the inscription:
public class TestModBase (
Enter this line:
public static Item testItem = new TestItem(2021).setUnlocalizedName("testItem");
Parsing:
public static final Item "testItem" - testItem is the name of our item in the code (not in the game)
new TestItem(2021) - TestItem the name of our item in the code (not in the game), 2021 item ID
setUnlocalizedName("testItem") - ("testItem") the name of our item in the code (not in the game)
After the inscription:
@Init
public void load(FMLInitializationEvent event)
{

Enter this line:
LanguageRegistry.addName(testItem, "Test Item");
Parsing:
(testItem, "Test Item") - testItem is the name of our item in the code (not in the game), "Test Item" is the name of our item in the game.
Create a file testItem and enter the following code into it:
package mods.testmod.src;

import net.minecraft.item.Item;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;

public class TestItem extends Item
{
public TestItem(int par1)
{
super(par1);
setCreativeTab(CreativeTabs.tabTools);
}

//Texture registration for an item is slightly different from a block
@Override
public void registerIcons(IconRegister par1IconRegister)
{
}
}


@Override
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon("testmod:testBlock");
}

("testmod:testBlock"), testmod is the "name of the folder" in which the "folder with the texture" will be, testBlock is the name of our texture. This is our texture placement:

\Tutorial Forge 1.5.1\mcp744\src\minecraft\mods\testmod\textures\blocks\testBlock.png


@Override
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon("testmod:testItem");
}

("testmod:testItem"), testmod is the "name of the folder" in which the "folder with the texture" will be, testItem is the name of our texture. This is our texture placement.

Many players dreamed of a program that could create modifications. Thanks to developer Pilo, anyone can download MCreator for Minecraft 1.7.2 and 1.7.10 and start creating their own mods without deep programming knowledge. Create new blocks, things, achievements, new types of existing blocks, mobs, biomes, food, tools, plants, cars and more. Any idea can be easily implemented using the MCreator 1.7.10/1.7.2 program.

Create different types of mods


This program allows you to create Various types modifications, including overlays (like in the mini map mod), cars, structures, dimensions, tool sets, weapons (swords, guns) and more.

Intuitive interface


MCreator offers a convenient way to place items in a menu. The developer just needs to move things and elements onto the work surface using the mouse.

Crafting recipes and drops


Write recipes and drops as easily as crafting in the game. Use filters to search through a huge list of things in Minecraft. MCreator can export pictures of recipes so that they can be placed on the site.

For experienced developers


Experienced developers will love the ability to edit mod source code in an easy-to-use interface. The MKreator program editor has syntax highlighting, auto-completion and other things that are pleasant for the programmer. Integration with Eclipse is supported.

Billiards