Post: How to make a Single Player MOD on Minecraft! [1.7.3]
08-16-2011, 11:09 PM #1
Merkii
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({}); Well I'm surprised no ones made one :O So I decided to make one because this section is really lacking it Happy

So there's a few things you'll need to go ahead and download first,
Minecraft Coders Pack, The latest version,

You must login or register to view this content.

A text editor, I will use Eclipse but any is fine :P

And Java SDK installed

Link: You must login or register to view this content.
Only install your systems version Happy

NOTE: Backup your .Minecraft folder, then delete it, and redownload the clean version!!!!!

Ok now we are ready to start!
[multipage=Step 1: Decompiling]
NOTE: Backup your .Minecraft folder, then delete it, and redownload the clean version!!!!!
NOTE: Backup your .Minecraft folder, then delete it, and redownload the clean version!!!!!
NOTE: Backup your .Minecraft folder, then delete it, and redownload the clean version!!!!!




Ok So the first thing we need to do is decompile minecraft so we can edit it, This is simply done.

1.) Go ahead and open your .minecraft folder
(Type %appdata% in RUN, Open the .minecraft folder )

2.) Open up your extracted MCP folder, Then open up the JARS folder.

3.) Go ahead and COPY+PASTE the bin folder and Resources from .minecraft into the Jars folder Smile (C&P THEM)

4.) Then OPEN the Bin directory in .minecraft and COPY AND PASTE the Minecraft.jar into your jars folder Winky Winky.

End result should be You must login or register to view this content.

5.) Now go to the main directory in MCP and run Decompile.bat

Now go to SRC<MINECRAFT<NET<MINECRAFT<SRC< There should be 100s of Java files Winky Winky This is good! Now we can go onto editing them Smile

[multipage=Step 2: Editing the Java's]
For this I will use Eclipse, Skip to the page "How to setup eclipse with MCP" to find out how Happy.


Now I will be showing you how to edit the max meat stack size Smile.

1.) Locate the file called ItemFood.java
2.) Double click it, You will get a small code
3.) locate
            maxStackSize = 1;
and change the one to whatever you like, as long as it is under 64!
I will use 16,

4.) Go ahead and just press CTRL+S to save it, Now you can close eclipse.
Editing is now done!!

[multipage=Step 3: Recompiling]
Go to the main directory again,

1.) Run recompile.bat
Wait for it to finish, there should be NO ERRORS.
2.) Then run Reobfuscate.bat and wait until it's done you should get something like
You must login or register to view this content.

3.) Navigate to MCP<REOBF<MINECRAFT< There will be one class there, that is your edited mod Claps

Now just open Minecraft.jar with your favorite program (7zip Winzip etc etc) now copy and paste the class in, delete META-INF and start minecraft.
kill a few pigs and you should notice you can stack to 16 now!!

[multipage=How to setup eclipse with MCP]

To use eclipse with MCP, just do the following steps:
- Decompile the Minecraft sources
- Open Eclipse
- Select the "eclipse" folder in MCP as workspace
- Create a mod
- You can test the modified client and server in Eclipse, debug
settings are already prepared to start the game in the IDE
- Recompile and reobfuscate as usual

[Multipage=Thanks for reading!]
Hopefully you enjoyed this tutorial, It was very basic of course and I will soon make more on more advanced stuff Winky Winky Until then enjoy life and minecraft :P
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to Merkii for this useful post:

I.Am.Swift, jkry_2_1_, JordyPordy, xd366
08-17-2011, 01:09 PM #2
Skyl1n3
DO SOMETHING THEN!
What happens if you put the number over 64?
08-17-2011, 01:17 PM #3
Merkii
Former Staff
Originally posted by Skyl1n3 View Post
What happens if you put the number over 64?


Haven't tried it :P I think the limit is 64 or 111 or around that :P You can try it if you like though :P
08-17-2011, 01:19 PM #4
Skyl1n3
DO SOMETHING THEN!
Originally posted by Merkii View Post
Haven't tried it :P I think the limit is 64 or 111 or around that :P You can try it if you like though :P


I'll stick with Cod5 for the moment :p
08-19-2011, 04:56 PM #5
Sharpie
Being awesome since 2009
Good stuff Merk, will you be expanding this tutorial to add info on creating new block types, items etc. If you need I can help with that stuff.
08-21-2011, 12:42 PM #6
Merkii
Former Staff
Ye I will be soon, just wondering, When you recompile the stuff where do i put the img's to test it? D=
08-22-2011, 09:43 AM #7
Sharpie
Being awesome since 2009
Originally posted by Merkii View Post
Ye I will be soon, just wondering, When you recompile the stuff where do i put the img's to test it? D=


It depends, are you using modloader and what image is it? I need to know a bit more about what you are trying to do first :p
08-22-2011, 11:21 AM #8
Merkii
Former Staff
Originally posted by Sharpie View Post
It depends, are you using modloader and what image is it? I need to know a bit more about what you are trying to do first :p


Ye I was adding new tools and it said to put the tool images in the config, then when i reobfuscated it they all moved to REOBF folder with 2 classes, where do i put them?
08-22-2011, 02:02 PM #9
Sharpie
Being awesome since 2009
Originally posted by Merkii View Post
Ye I was adding new tools and it said to put the tool images in the config, then when i reobfuscated it they all moved to REOBF folder with 2 classes, where do i put them?


What does your coding say to put them? You might see something like

override /terrain.png replace /yourpick.png

in which case it just goes inside the minecraft.jar

otherwise you have to add it to the images that have all the items in and then give it a special I.D.

For example, using modloader to make a block would just use the override the terrain.png so you could create an image 16x16 for your block texture and save it inside minecraft.jar.

Otherwise you would have to draw the texture inside the terrain.png and give it the correct I.D. Not too complicated once you know what you are doing. Check the official forums of minecraft for more tuts etc.
08-22-2011, 02:15 PM #10
Merkii
Former Staff
Originally posted by Sharpie View Post
What does your coding say to put them? You might see something like

override /terrain.png replace /yourpick.png

in which case it just goes inside the minecraft.jar

otherwise you have to add it to the images that have all the items in and then give it a special I.D.

For example, using modloader to make a block would just use the override the terrain.png so you could create an image 16x16 for your block texture and save it inside minecraft.jar.

Otherwise you would have to draw the texture inside the terrain.png and give it the correct I.D. Not too complicated once you know what you are doing. Check the official forums of minecraft for more tuts etc.


override gui/items.png /pick.png :L

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo