Minecraft Blogs / Tutorial

[Creating mods] Basic mod part 2 Making crafting recepies

  • 474 views, 1 today
  • 1
  • 1
anthonyyoyo's Avatar anthonyyoyo
Level 31 : Artisan Explorer
10
Follow me on twitter!:
https://twitter.com/Anthonyyoyo

This series is basically a series that will show you how to make a mod! Did you miss part 1 tho? Click here to watch it right now!

Anyway let's get back to what we we're doing...When we left off last episode we set up MCP and we got our coding program (I use notepad++). Let's start for real now.

After setting up MCP your gonna want to go into the folder (MCP) and go into this place: mcpsrcminecraftnetminecraft (Find that until you get to minecrat). In this minecraft folder you will see more then 1 150 files! Those are all files you will need for your editing.

Now get a pin and paper because everything is gonna step up your game right now.
First thing to edit a .java language file is to right click it then select your ''Coding language program'' If your not the smartest and don't remember, this should be notepad++ or any other coding program.

Now that you know everything on how to open it we are gonna find a file to edit a our recipe on...Let's find one...Type ''recipe'' in the search bar on top and go down until you fine ''RecipesCrafting.java'' Open it and it should look like this:
Spoiler

package net.minecraft.src;

public class RecipesCrafting
{
/**
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager par1CraftingManager)
{
par1CraftingManager.addRecipe(new ItemStack(Block.chest), new Object[] {"###", "# #", "###", '#', Block.planks});
par1CraftingManager.addRecipe(new ItemStack(Block.enderChest), new Object[] {"###", "#E#", "###", '#', Block.obsidian, 'E', Item.eyeOfEnder});
par1CraftingManager.addRecipe(new ItemStack(Block.stoneOvenIdle), new Object[] {"###", "# #", "###", '#', Block.cobblestone});
par1CraftingManager.addRecipe(new ItemStack(Block.workbench), new Object[] {"##", "##", '#', Block.planks});
par1CraftingManager.addRecipe(new ItemStack(Block.sandStone), new Object[] {"##", "##", '#', Block.sand});
par1CraftingManager.addRecipe(new ItemStack(Block.sandStone, 4, 2), new Object[] {"##", "##", '#', Block.sandStone});
par1CraftingManager.addRecipe(new ItemStack(Block.sandStone, 1, 1), new Object[] {"#", "#", '#', new ItemStack(Block.stoneSingleSlab, 1, 1)});
par1CraftingManager.addRecipe(new ItemStack(Block.stoneBrick, 4), new Object[] {"##", "##", '#', Block.stone});
par1CraftingManager.addRecipe(new ItemStack(Block.fenceIron, 16), new Object[] {"###", "###", '#', Item.ingotIron});
par1CraftingManager.addRecipe(new ItemStack(Block.thinGlass, 16), new Object[] {"###", "###", '#', Block.glass});
par1CraftingManager.addRecipe(new ItemStack(Block.redstoneLampIdle, 1), new Object[] {" R ", "RGR", " R ", 'R', Item.redstone, 'G', Block.glowStone});
}
}


If it doesn't look like that you may be in the wrong file, try again. If it does look like this you are ready! Now let's start by the basic crafting editor for this scrip. Copy the '' par1CraftingManager.addRecipe(new ItemStack(Block.thinGlass, 16), new Object[] {"###", "###", '#', Block.glass}); '' and now make a space and past it under the real crafting recipe...

So let's make the ''REAL CRAFTING RECIPE NOW!'' All of you may be mad because this is taking so long but don't be scared...After one try you are all done or the MCP folder thingy'' Now, before we actually make the recipe i need to talk to you about a little bit of what all this means (par1CraftingManager.addRecipe(new ItemStack(Block.thinGlass, 16), new Object[] {"###", "###", '#', Block.glass});) I will right down every word you will need to understand.
1.new object
2.(Block,thinGlass, 16)
3.{"###","###",'#',Block.glass});

Okay let's start with number 1, New object means that this is a ''New object'' and this name should not be touched!

Now for number 2, number 2 is basically the item or block output ''But anthonyyoyo what is an output?'' An output is what the crafting will give you, for example 3 wheat makes one bread. So putting (Block,thinGlass, 16) will give you 16 thinGlass when you craft it.

Ok now we are getting to the hard AS HELL stuff. Number 3. Let's get this into an easier to explain mode. The "###" and the crafting boxes and '#'=Block.glass (You must use (") and (') when coding a recipe. so if we wanted to make this recipe only dirt we would have to change the code from this into this:
Spoiler
New code: par1CraftingManager.addRecipe(new ItemStack(Block.thinGlass, 16), new Object[] {"###", "###", '#', Block.dirt});


The only thing i did was change "block.glass" into "Block.dirt''.

Now that you followed everything your gonna want to save all your progress and next episode we will show you how to ''test and upload your mod!''

click here for part 3! (it is not out yet :'()

follow me on twitter for more info ect...:
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
https://twitter.com/Anthonyyoyo
Creditmod moding mod tips people mods awesome how to ttuotoraial tutorials totorials tututrials
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome