Minecraft Blogs

How To Make A Minecraft Mod (no.1 [adding a new crafting recipe])

  • 9
  • 8
  • 108
avatar fox_news
Level 60 : High Grandmaster Programmer
207
how to make a minecraft mod
no.1

adding a new crafting recipe
click on support page if you have any errors or you need help with the tuorial:
SUPPORT PAGE

required:
Welcome to How To Make A Minecraft Mod (crafting recipes)!
in this tutorial i will show you how to make a new crafting recipe!
please follow the steps in ORDER or this will make no sense!
to day i am going to show you how to make this crafting recipe:
xASjpg

if you already set up MCP then skip to step #13 and run eclipse


  1. download required files (if you have already done that skip to step #2)
    make sure you download the current file. for eclipse, get the classic version


  2. extract MCP into a FOLDER on your desktop

  3. open the MCP folder

  4. open jars folder

  5. open you .minecraft folder (on windows click start, accessories, run, type in %appdata%)

  6. copy bin and resource folders into jar folder (in MCP)

  7. open the bin folder (the one that's in the MCP)( also you can close out your .minecraft folder)

  8. right click on minecraft.jar and (if your using 7zip, click open archive)

  9. right click on your ModLoader.zip and do the same as in step #8 and open archive

  10. drag everything from the ModLoader.zip into your minecraft.jar (DO NOT DELETE META-INF!!!!!)

  11. close minecraft.jar and modloader.zip + in the root of the MCP folder run decompile.bat


  12. during the decompile process you should get an error that has Render in it, that's ok. if you did not get that you did somthing wrong.


  13. once it finishes run your eclipse.exe and select your workspace as the eclipse folder in the root of your MCP


  14. once its loaded on your eclipse client, open the client folder in the package explorer, then open the src, then
    net.minecraft.src, then right click net.minecraft.src and select New -> Class


  15. base mod names must be named with mod_ (e.x. mod_MyNewMod )


  16. add abstract right after public so you get public abstract class mod_MyNewMod and add extends BaseMod after your mod name.


  17. then add this inside of the brackets (everything goes inside those brackets you see when you make a new class):



    public mod_MyNewMod()
    {

    }
    public void load()
    {

    }
    public String getVersion()
    {
    return "MyNewMod 1.2.5";
    }


  18. in the public void load() add this:

    ModLoader.addRecipe(new ItemStack(Block.sponge, 1), new Object[]
    {

    "XXX", "TBT", "XXX", 'X', Block.sand, 'T', Item.clay, 'B', Item.bucketEmpty

    });

    the " 1 " after block.sponge is how many you get out of crafting
    the "XXX" is the top row, the "TBT" is the middle row, and the last one is the last row
    the 'X', Block.sand tells what the X means in the crafting recipe (same thing for the others)


  19. save your class file and go back to your MCP folder


  20. run recompile.bat (if you get an error you did something wrong)


  21. if you get no errors then run startclient.bat


  22. test out your new crafting recipe


  23. on MCP click the conf folder


  24. open the client.txt


  25. delete EVERYTHING there


  26. save the file


  27. in the root of MCP run Rebustfocate


  28. after it is done your mod files will be in the rebof folder


  29. Guess what? Your done with your first mod! Congrats!
if you want you can go on to the 2nd tutorial now!
Tags

3 Update Logs

Update #3 : 10/10/2012 5:42:31 pmOct 10th, 2012

fixed some spelling errors
LOAD MORE LOGS

1
03/05/2013 8:19 pm
Level 3 : Apprentice Explorer
bryce0110
What happends if the Computer Wont let you Download Java JDK? Then what do i do?
1
03/06/2013 7:34 pm
Level 60 : High Grandmaster Programmer
fox_news
then you can't make mods
1
01/29/2013 10:08 pm
Level 34 : Artisan Pokemon
derpy_turtle
How do you leave a spot in the crafting bench blank?
1
01/30/2013 12:46 am
Level 60 : High Grandmaster Programmer
fox_news
just put a space
1
12/04/2012 4:08 am
Level 23 : Expert Dragonborn
NewSuperMario
Errors in recompile.bat:

"Syntax error" I will post a picture of the errors as soon as I can :)
1
12/02/2012 6:14 am
Level 60 : High Grandmaster Programmer
fox_news
leak: working on a program made to make the mods for you
1
12/02/2012 5:41 am
Level 23 : Expert Dragonborn
NewSuperMario
Ok, now I'm on step 21! :)
1
12/01/2012 11:53 am
Level 23 : Expert Dragonborn
NewSuperMario
Now, these are all errors I got;
Error:
'runtimebinapplydaff.exe -p1 -u -i ....temptemp.patch -d srcminecraft' failed : 1

==ERRORS FOUND==
1 out of 1 hunk ignored -- saving rejects to file 'netminecraftsrcIntegratedSer#'
===================

!! Can not find server sources, try decompiling !!

Picture of the error:Error picture link
1
12/01/2012 2:46 pm
Level 60 : High Grandmaster Programmer
fox_news
YOU NEED TO ADD minecraft_server.jar INTO YOUR JARS FOLDER!
1
12/03/2012 6:00 am
Level 23 : Expert Dragonborn
NewSuperMario
It didn't work.... where in the jars folder should I put it? Does it have to be a .jar file? Can't it be a .exe file?
1
12/03/2012 11:10 pm
Level 60 : High Grandmaster Programmer
fox_news
no, it has to be a .jar and named minecraft_server.jar. you need to put it in the root of your jars folder
1
12/04/2012 4:06 am
Level 23 : Expert Dragonborn
NewSuperMario
Yes, I found out that. It finally worked :) EXCEPT that it came up like many "syntax" errors when I runned recompile.bat. I did exactly like you wrote. Why didn't it work? I even tested your mod and it didn't work.
1
12/02/2012 3:54 am
Level 23 : Expert Dragonborn
NewSuperMario
Can't you add that in the tutorial so I remember it?
1
12/02/2012 3:51 am
Level 23 : Expert Dragonborn
NewSuperMario
Ok, but that didn't stand in the tutorial, right?
1
12/02/2012 4:37 am
Level 60 : High Grandmaster Programmer
fox_news
i didn't think that anyone would need to know that xD
1
12/02/2012 5:39 am
Level 23 : Expert Dragonborn
NewSuperMario
However, you can may write like this on number 6;

(and minecraft_server.jar)

Then I will remember it :D
1
12/02/2012 5:34 am
Level 23 : Expert Dragonborn
NewSuperMario
xD
1
11/30/2012 1:31 pm
Level 23 : Expert Dragonborn
NewSuperMario
Error:
'runtimebinapplydaff.exe -p1 -u -i ....temptemp.patch -d srcminecraft' failed : 1

==ERRORS FOUND==
1 out of 1 hunk ignored -- saving rejects to file 'netminecraftsrcIntegratedSer#'
===================
Can you say what's the error is now? I think it has something to do with the new ''fernflower'' thing...

Picture of the error:
Error picture link
1
11/30/2012 4:44 pm
Level 60 : High Grandmaster Programmer
fox_news
is the error affecting your mod? if not then just leave it because it is just a MCP thing and not the real minecraft client.
1
12/01/2012 11:22 am
Level 23 : Expert Dragonborn
NewSuperMario
Hmm... it stands something about ''servers'' . So the error may affected my mod, cause when I runned recompile it came a error about ''server not found'' or something like that...
1
12/01/2012 2:45 pm
Level 60 : High Grandmaster Programmer
fox_news
for servers you need to add minecraft_server.jar into your jars folder then decompile
1
12/02/2012 3:51 am
Level 23 : Expert Dragonborn
NewSuperMario
Ok :)
1
12/01/2012 7:17 am
Level 23 : Expert Dragonborn
NewSuperMario
No, I don't think it would affect anything.... Ok, thanks for the help! :)

But I didn't get that "render" error...
1
11/20/2012 8:31 pm
Level 1 : New Miner
jonathands8
by the way, the java JDK download link doses not work
1
10/30/2012 2:36 pm
Level 23 : Expert Dragonborn
NewSuperMario
''Error Found:
1 out of 1 hunk ignored''

What's wrong?
1
10/30/2012 2:56 pm
Level 60 : High Grandmaster Programmer
fox_news
does it say anything with modloader? and decompile or recompile?
1
11/15/2012 12:19 pm
Level 23 : Expert Dragonborn
NewSuperMario
1 out of 1 hunk ignored - saving rejects to file 'netminecraftsrcIntegratedSer#'

That was the error
1
11/20/2012 9:36 pm
Level 1 : New Miner
jonathands8
that happened to me too
1
11/21/2012 3:11 am
Level 23 : Expert Dragonborn
NewSuperMario
yeah, wonder what happened...
1
10/31/2012 4:00 am
Level 23 : Expert Dragonborn
NewSuperMario
Not really, but it reload all the files after the error...
1
10/30/2012 10:33 am
Level 44 : Master Modder
fragmen52
I cant open src :(
1
10/30/2012 2:56 pm
Level 60 : High Grandmaster Programmer
fox_news
the folder?
1
10/30/2012 5:38 pm
Level 44 : Master Modder
fragmen52
in eclipse
1
10/30/2012 7:10 pm
Level 60 : High Grandmaster Programmer
fox_news
oh ok i know what you mean. the location of the files are cleint/src/net.minecraft.src/
try going there
1
10/30/2012 9:37 pm
Level 44 : Master Modder
fragmen52
in eclipse after client u cant click src(it wont open). when I do decompile.bat only like 15 lines come up is that bad?
1
10/30/2012 9:39 pm
Level 60 : High Grandmaster Programmer
fox_news
post a pic
1
10/25/2012 9:12 am
Level 23 : Expert Dragonborn
NewSuperMario
It doesn't exist a modloader for minecraft 1.4 yet. What should I do now????
1
10/25/2012 4:29 pm
Level 60 : High Grandmaster Programmer
fox_news
umm this is for 1.3.2 you need to wait for 1.4 to come out then wait for modloader to make a new version
1
10/26/2012 8:07 am
Level 23 : Expert Dragonborn
NewSuperMario
umm, 1.4 is out, haven't you logged in and updated yet???
1
10/26/2012 4:34 pm
Level 60 : High Grandmaster Programmer
fox_news
oh oops xD well happy 1.4
now just to wait for modloader, also i can now start making new mods because i got my new computer!
1
10/27/2012 2:19 am
Level 23 : Expert Dragonborn
NewSuperMario
I also got a new computer! :)
(I got it for like 2-3 months ago)
1
10/30/2012 2:56 pm
Level 60 : High Grandmaster Programmer
fox_news
1.4.2 modloader is out
1
10/08/2012 9:22 am
Level 23 : Expert Dragonborn
NewSuperMario
Now you wrote a bit wrong again, think if anyone new to minecraft reads this:''location of .mincraft folder (you can type %appdata% in run to locate it)''

It stands ''.MINCRAFT'' instead of ''.MINECRAFT''. If you are new to minecraft(or new to mods and so) you would not understand what that folder is.
1
10/09/2012 5:47 pm
Level 60 : High Grandmaster Programmer
fox_news
hmm? can you read? it says .minecraft not .mincraft
second i have not had one person complain about not finding it
1
10/10/2012 8:49 am
Level 23 : Expert Dragonborn
NewSuperMario
What? Then it is something wrong on my computer screen, because it stands for me:
''how to make a mincraft mod''
and
''location of .mincraft folder (you can type %appdata% in run to locate it)''
1
10/10/2012 5:42 pm
Level 60 : High Grandmaster Programmer
fox_news
on my screen it is fine
1
10/11/2012 7:40 am
Level 23 : Expert Dragonborn
NewSuperMario
Just looked at my Ipad and now it stands "how to make a minecraft mod" and "location of .minecraft folder (you can type %appdata% in run to locate it)".

...I guess that it is something wrong on my screen on my computer OR it is my annoying antivirus program :(
Sometimes it hides things that isn't viruses.... :(
1
10/11/2012 10:02 am
Level 23 : Expert Dragonborn
NewSuperMario
Oh, I see, in the update log, that's why it stands right.
1
08/31/2012 6:04 pm
Level 1 : New Miner
henry2242
I did exactly what you said to do but when i try out my crafting recipe it doesn't come up? What did i do wrong?
1
09/02/2012 11:22 am
Level 60 : High Grandmaster Programmer
fox_news
did you recompile?
1
09/02/2012 9:26 pm
Level 1 : New Miner
henry2242
I did but ill try performing a cleanup.
Planet Minecraft Logo

Website

© 2010 - 2020
www.planetminecraft.com

Welcome