Minecraft Blogs / Tutorial

[1.3.2] Full Modding Tutorial - Setup, Blocks, Items, and recipes!

  • 3,592 views, 3 today
  • 14
  • 7
  • 24
felixmc's Avatar felixmc
Level 74 : Legendary Programmer
665
Modding Tutorials


I've noticed a ton of people want to learn how to mod, so here it is. This blog is a huge tutorial on how to create your very own mod with blocks, items, recipes and food. More to come.


1a. SETUP FOR WINDOWS


Setup


1. Download MCP at mcp.ocean-labs.de/index.php/MCP_Releases

2. Download ModLoader.

3. Open up MCP.

4. Navigate to %appdata%/.minecraft

5. Copy your 'bin' folder into the 'jars' folder in MCP.

6. Open your 'bin' folder and open minecraft.jar with a archive utility(WinRAR).

7. Drag contents of ModLoader into there.

8. Open decompile.bat in the MCP folder.

9. Done!


1b. SETUP FOR MAC


Setup for Mac


1. Download MCP at mcp.ocean-labs.de/index.php/MCP_Releases

2. Download ModLoader.

3. Open up MCP.

4. Navigate to /User/Library/Application Support/minecraft/

5. Copy your 'bin' folder into the 'jars' folder in MCP.

6. Open your 'bin' folder and open minecraft.jar with a archive utility.

7. Open up the resulting 'minecraft' folder, and drag contents of ModLoader into there.

8. Select everything in your 'minecraft' folder and right-click, then choose Compress.

9. Drag resulting 'Archive.zip' back into 'bin' folder.

10. Rename minecraft.jar something else and rename Archive.zip minecraft.jar.

11. Open Terminal.

12. Type in cd(space) then drag your MCP folder into Terminal, and click Enter.

13. Type bash decompile.sh in Terminal.

14. Wait.


2. Block with Recipe


Block
Block: Main Mod File
Block: Block File
return mod_FelixBlock.FelixBlock.blockID;

This means it will drop itself.


3. Item


Item
Item: Main Item Code


package net.minecraft.src;




public class mod_FelixItem extends BaseMod


{


public static final Item FelixItem = new ItemFelixItem(5000).setItemName("FelixItem");





public void load()


{


FelixItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/felix/FelixItem.png");


ModLoader.addName(FelixItem, "Felix Item");




FelixItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/planets/FelixItem.png");


ModLoader.addRecipe(new ItemStack(FelixItem, 1), new Object[]


{


"###", "XXX", " X ", '#', mod_FelixItem.FelixItem, 'X', Item.stick


});


}





public String getVersion()


{


return "1.3.2";


}


}

So the declarations are pretty much the same as the block (textures, item ID's, recipe).

Next, we have another very simple file, ItemFelixItem:

Item: Item File

package net.minecraft.src;

public class ItemFelixItem extends Item
{
public ItemFelixItem(int i)
{
super(i);
maxStackSize = 64;
}
}


And that's that!

maxStackSize declares how much of the item you can have in one stack.


MORE TO COME!


Note: You can edit the names. Ex.: You can change the words FelixBlock into whatever you want. Just don't change the main code structure.


Don't forget to comment, diamond, and subscribe!
Tags

Create an account or sign in to comment.

1
12/08/2014 10:09 pm
Level 5 : Apprentice Crafter
NextGen_Craft
NextGen_Craft's Avatar
I cant find my bin.
1
12/26/2012 9:50 pm
Level 16 : Journeyman Crafter
vgmusz
vgmusz's Avatar
Subscribe :DONE

Diamond :DONE

Comment :DONE!
1
10/26/2012 3:39 am
Level 55 : Grandmaster Pokemon
LeoL274
LeoL274's Avatar
ummm, sorry but this makes my minecraft crash:

Minecraft has crashed!
----------------------

Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:UsersJustine and MarkDownloadsmcp72jars.crash-reportscrash-2012-10-26_19.39.16-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.



--- BEGIN ERROR REPORT 5b90aee8 --------
Generated 26/10/12 7:39 PM

- Minecraft Version: 1.3.2
- Operating System: Windows Vista (amd64) version 6.0
- Java Version: 1.7.0_07, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 994562496 bytes (948 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
- JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
- ModLoader: Mods loaded: 2
ModLoader 1.3.2
mod_MinecraftUniverse 1.3.2

java.lang.ArrayIndexOutOfBoundsException: 2001
at net.minecraft.src.ModLoader.initStats(ModLoader.java:1002)
at net.minecraft.src.ModLoader.init(ModLoader.java:975)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:186)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:413)
at net.minecraft.client.Minecraft.run(Minecraft.java:733)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 7223801f ----------

yes my mod is called mod_MinecraftUniverse
1
09/21/2012 11:42 am
Level 6 : Apprentice Miner
pipbiff
pipbiff's Avatar
where do i dwonload this!!!!!!!! its sooo cool
1
09/21/2012 11:42 am
Level 6 : Apprentice Miner
pipbiff
pipbiff's Avatar
how do i dim end
1
09/09/2012 9:15 am
Level 37 : Artisan Geek
Upper_Echelon
Upper_Echelon's Avatar
could u make a tut on how to make a gun mod? and armor?
1
09/08/2012 11:06 pm
Level 8 : Apprentice Modder
IvyTheLeopard
IvyTheLeopard's Avatar
wheres the src folder?
1
09/05/2012 12:38 am
Level 61 : High Grandmaster Modder
ehdfawq3er
ehdfawq3er's Avatar
Felix, you know you can put more items in 1 mod_ file..
1
09/04/2012 2:50 am
Level 55 : Grandmaster Pokemon
LeoL274
LeoL274's Avatar
I love everything that this guy does, I love space (Solar System Mod) I like Pokemon (Pokemon Mod) I love a challenge (Nightmare Monsters Mod) I love Doctor Who (Eleventh Doctor Skin) and Ive been looking for a decent guide on Minecraft Modding! Subscribe 4 Felix now!
1
09/08/2012 10:44 pm
Level 74 : Legendary Programmer
felixmc
felixmc's Avatar
Haha thanks :D
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome