8

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

8 diamonds

example of a new crafting recipe

  • 2,904
    Views, 7 today
  • 108
    Comments
  • 7
    Favorites
  • Flag / Report

Get Embed Code

Forum:
HTML:
Link:
avatar fox_news
Level 52 : Grandmaster Programmer
Posted 04/22/12 5:35:29 pm , last updated: 10/10/12 5:42:31 pm
04/22/12
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:
x0A1S.jpg

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!

Additional Details

Tags:Hot, Cool, Popular, New, Modding, Mods, Mod, Help Tutorial, How, Make, Fun, Article, Tutorial

Update #3 : 10/10/2012 5:42:31 pm10/10/12

fixed some spelling errors

Update #2 : 06/17/2012 2:02:34 pm6/17/12

its JDK not SDK
Sorry

Update #1 : 04/22/2012 7:34:27 pm4/22/12

added how to save the mod xD sry about that i forgot about it

Join us to post comments.

Comments : 108

1 - 50 of 108

bryce0110
Level 1
New Explorer
March 5, 2013, 3:19 pm

What happends if the Computer Wont let you Download Java JDK? Then what do i do?

fox_news
Level 52
Grandmaster Programmer
March 6, 2013, 2:34 pm

then you can't make mods

derpy_turtle
Level 24
Expert Ninja
January 29, 2013, 5:08 pm

How do you leave a spot in the crafting bench blank?

fox_news
Level 52
Grandmaster Programmer
January 29, 2013, 7:46 pm

just put a space

NewSuperMario
Level 17
Journeyman Dragonborn
December 3, 2012, 11:08 pm

Errors in recompile.bat:

"Syntax error" I will post a picture of the errors as soon as I can :)

fox_news
Level 52
Grandmaster Programmer
December 2, 2012, 1:14 am

leak: working on a program made to make the mods for you

NewSuperMario
Level 17
Journeyman Dragonborn
December 2, 2012, 12:41 am

Ok, now I'm on step 21! :)

NewSuperMario
Level 17
Journeyman Dragonborn
December 1, 2012, 6:53 am

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

fox_news
Level 52
Grandmaster Programmer
December 1, 2012, 9:46 am

YOU NEED TO ADD minecraft_server.jar INTO YOUR JARS FOLDER!

NewSuperMario
Level 17
Journeyman Dragonborn
December 3, 2012, 1:00 am

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?

fox_news
Level 52
Grandmaster Programmer
December 3, 2012, 6:10 pm

no, it has to be a .jar and named minecraft_server.jar. you need to put it in the root of your jars folder

NewSuperMario
Level 17
Journeyman Dragonborn
December 3, 2012, 11:06 pm

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.

NewSuperMario
Level 17
Journeyman Dragonborn
December 1, 2012, 10:54 pm

Can't you add that in the tutorial so I remember it?

NewSuperMario
Level 17
Journeyman Dragonborn
December 1, 2012, 10:51 pm

Ok, but that didn't stand in the tutorial, right?

fox_news
Level 52
Grandmaster Programmer
December 1, 2012, 11:37 pm

i didn't think that anyone would need to know that xD

NewSuperMario
Level 17
Journeyman Dragonborn
December 2, 2012, 12:39 am

However, you can may write like this on number 6;

(and minecraft_server.jar)

Then I will remember it :D

NewSuperMario
Level 17
Journeyman Dragonborn
December 2, 2012, 12:34 am

xD

NewSuperMario
Level 17
Journeyman Dragonborn
November 30, 2012, 8:31 am

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:

fox_news
Level 52
Grandmaster Programmer
November 30, 2012, 11:44 am

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.

NewSuperMario
Level 17
Journeyman Dragonborn
December 1, 2012, 6:22 am

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...

fox_news
Level 52
Grandmaster Programmer
December 1, 2012, 9:45 am

for servers you need to add minecraft_server.jar into your jars folder then decompile

NewSuperMario
Level 17
Journeyman Dragonborn
December 1, 2012, 10:51 pm

Ok :)

NewSuperMario
Level 17
Journeyman Dragonborn
December 1, 2012, 2:17 am

No, I don't think it would affect anything.... Ok, thanks for the help! :)

But I didn't get that "render" error...

jonathands8
Level 1
New Miner
November 20, 2012, 3:31 pm

by the way, the java JDK download link doses not work

NewSuperMario
Level 17
Journeyman Dragonborn
October 30, 2012, 10:36 am

''Error Found:
1 out of 1 hunk ignored''


What's wrong?

fox_news
Level 52
Grandmaster Programmer
October 30, 2012, 10:56 am

does it say anything with modloader? and decompile or recompile?

NewSuperMario
Level 17
Journeyman Dragonborn
November 15, 2012, 7:19 am

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


That was the error

jonathands8
Level 1
New Miner
November 20, 2012, 4:36 pm

that happened to me too

NewSuperMario
Level 17
Journeyman Dragonborn
November 20, 2012, 10:11 pm

yeah, wonder what happened...

NewSuperMario
Level 17
Journeyman Dragonborn
October 31, 2012, 12:00 am

Not really, but it reload all the files after the error...

fragmen52
Level 31
Artisan Modder
October 30, 2012, 6:33 am

I cant open src :(

fox_news
Level 52
Grandmaster Programmer
October 30, 2012, 10:56 am

the folder?

fragmen52
Level 31
Artisan Modder
October 30, 2012, 1:38 pm

in eclipse

fox_news
Level 52
Grandmaster Programmer
October 30, 2012, 3:10 pm

oh ok i know what you mean. the location of the files are cleint/src/net.minecraft.src/
try going there

fragmen52
Level 31
Artisan Modder
October 30, 2012, 5:37 pm

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?

fox_news
Level 52
Grandmaster Programmer
October 30, 2012, 5:39 pm

post a pic

fragmen52
Level 31
Artisan Modder
October 30, 2012, 5:51 pm

couldn't get a pic I would press the key to take a pic and it would go away but got this http://www.mediafire.com/download.php?4j7p092tqcbkwku I just uploaded it

fragmen52
Level 31
Artisan Modder
November 1, 2012, 6:54 am

found the problem using old coder pack

NewSuperMario
Level 17
Journeyman Dragonborn
October 25, 2012, 5:12 am

It doesn't exist a modloader for minecraft 1.4 yet. What should I do now????

fox_news
Level 52
Grandmaster Programmer
October 25, 2012, 12:29 pm

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

NewSuperMario
Level 17
Journeyman Dragonborn
October 26, 2012, 4:07 am

umm, 1.4 is out, haven't you logged in and updated yet???

fox_news
Level 52
Grandmaster Programmer
October 26, 2012, 12:34 pm

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!

NewSuperMario
Level 17
Journeyman Dragonborn
October 26, 2012, 10:19 pm

I also got a new computer! :)
(I got it for like 2-3 months ago)

fox_news
Level 52
Grandmaster Programmer
October 30, 2012, 10:56 am

1.4.2 modloader is out

NewSuperMario
Level 17
Journeyman Dragonborn
October 31, 2012, 12:01 am

I know :)

NewSuperMario
Level 17
Journeyman Dragonborn
October 8, 2012, 5:22 am

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.

fox_news
Level 52
Grandmaster Programmer
October 9, 2012, 1:47 pm

hmm? can you read? it says .minecraft not .mincraft
second i have not had one person complain about not finding it

NewSuperMario
Level 17
Journeyman Dragonborn
October 10, 2012, 4:49 am

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)''

fox_news
Level 52
Grandmaster Programmer
October 10, 2012, 1:42 pm

on my screen it is fine

NewSuperMario
Level 17
Journeyman Dragonborn
October 11, 2012, 3:40 am

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.... :(

NewSuperMario
Level 17
Journeyman Dragonborn
October 11, 2012, 6:02 am

Oh, I see, in the update log, that's why it stands right.

fox_news
Level 52
Grandmaster Programmer
October 11, 2012, 11:54 am

:P
i found out what you were talking about

NewSuperMario
Level 17
Journeyman Dragonborn
October 12, 2012, 5:58 am

Yeah, I'm not so good at explaining xD


Ich bin 11 jahre alt. 


Did you get it? It's deutsch, but I'm not from Germany I'm just learning it...

henry2242
Level 1
New Miner
August 31, 2012, 2:04 pm

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?

fox_news
Level 52
Grandmaster Programmer
September 2, 2012, 7:22 am

did you recompile?

henry2242
Level 1
New Miner
September 2, 2012, 5:26 pm

I did but ill try performing a cleanup.

fox_news
Level 52
Grandmaster Programmer
September 2, 2012, 5:48 pm

that will get rid of the decompile so you will need to re-decompile and start over
you did something wrong so try reading and doing the steps again because it works and not just for me

henry2242
Level 1
New Miner
September 2, 2012, 8:02 pm

Ok. I probably did do something wrong.

NewSuperMario
Level 17
Journeyman Dragonborn
August 19, 2012, 6:53 am

I followed the steps exactly and I didn't delete meta-inf but it didn't came up a error with render in it.
Instead I got a another error and it runned recompile.bat.



Before I set up mcp I even clicked force update so if I had any mods they would be deleted.
What should I do now? Set it up again..?

fox_news
Level 52
Grandmaster Programmer
August 21, 2012, 7:47 pm

what was the error?

NewSuperMario
Level 17
Journeyman Dragonborn
August 22, 2012, 6:50 am

I don't remember but I can check it.
It is possible to see all the errors somewhere, right?

fox_news
Level 52
Grandmaster Programmer
August 22, 2012, 11:56 am

idk

NewSuperMario
Level 17
Journeyman Dragonborn
August 22, 2012, 8:33 pm

I can reply after the school. I end the school at 13:40 today and it takes a quarter to take the bus, so I can check the error at 14:15.

NewSuperMario
Level 17
Journeyman Dragonborn
October 30, 2012, 10:24 am

Emhh, I think I found the error. Recours folders, does that mean the ''recourses'' folder or all the folders in .minecraft?

luke_chaos
Level 13
Journeyman Creeper Hugger
July 18, 2012, 9:48 am

BOSSSSS IT WORXED

fox_news
Level 52
Grandmaster Programmer
August 21, 2012, 7:48 pm

congratz

jordanpyke
Level 35
Artisan Dwarf
July 11, 2012, 3:38 pm

step 18 did not work for me

fox_news
Level 52
Grandmaster Programmer
August 21, 2012, 7:48 pm

what was the error

1 - 50 of 108