Minecraft Blogs / Tutorial

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

  • 7,746 views, 1 today
  • 9
  • 8
  • 108
fox_news's 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 : by fox_news 10/10/2012 5:42:31 pmOct 10th, 2012

fixed some spelling errors
LOAD MORE LOGS

Create an account or sign in to comment.

1
03/05/2013 8:19 pm
Level 3 : Apprentice Explorer
bryce0110
bryce0110's Avatar
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
fox_news's Avatar
then you can't make mods
1
01/29/2013 10:08 pm
Level 34 : Artisan Pokemon
derpy_turtle
derpy_turtle's Avatar
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
fox_news's Avatar
just put a space
1
12/04/2012 4:08 am
Level 25 : Expert Dragonborn
NewSuperMario
NewSuperMario's Avatar
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
fox_news's Avatar
leak: working on a program made to make the mods for you
1
12/02/2012 5:41 am
Level 25 : Expert Dragonborn
NewSuperMario
NewSuperMario's Avatar
Ok, now I'm on step 21! :)
1
12/01/2012 11:53 am
Level 25 : Expert Dragonborn
NewSuperMario
NewSuperMario's Avatar
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
fox_news's Avatar
YOU NEED TO ADD minecraft_server.jar INTO YOUR JARS FOLDER!
1
12/03/2012 6:00 am
Level 25 : Expert Dragonborn
NewSuperMario
NewSuperMario's Avatar
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?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome