1

MCP crafting with item from our mod ?

Spect99's Avatar Spect9910/12/13 11:36 am
1 emeralds 283 5
10/14/2013 2:53 pm
Spect99's Avatar Spect99
Hello Guys,
I just wanted to know , how can we make an item Craftable with items from our mod ( that we created)
i tried putting it in the Item.java but nothing.
Thx for those who will help
Posted by Spect99's Avatar
Spect99
Level 43 : Master Droid
46

Create an account or sign in to comment.

5

Tudedude100
10/14/2013 12:29 am
Level 35 : Artisan Nerd
Tudedude100's Avatar
Well, if your crafting recipe is in the same folder, I would assume you could just do this for the crafting recipe. For example if the item is called randomItem:

ItemStack dirtStack = new ItemStack(Block.dirt);
ItemStack randomItemStack = new ItemStack(randomItem);

GameRegistry.addRecipe(new ItemStack(Block.cobblestone), "xy", "yx",
'x', dirtStack, 'y', randomItemStack);

You shouldn't need to declare it as Item.randomItem
1
Spect99
10/14/2013 2:53 pm
Level 43 : Master Droid
Spect99's Avatar
Ok thx i will try when i get home !
1
Spect99
10/12/2013 12:30 pm
Level 43 : Master Droid
Spect99's Avatar
i also tried this :
new ItemStack(Item.myItem)
But not working too
1
Spect99
10/12/2013 11:52 am
Level 43 : Master Droid
Spect99's Avatar
I Mean for exemple

"I "
" X ",
" X",

I is Iron and X my item. how can i say that X is my Item , cause it doesnt show up in the
Item. list.
Thx for helping.
1
Tudedude100
10/12/2013 11:44 am
Level 35 : Artisan Nerd
Tudedude100's Avatar
Could you maybe post a pastebin with your code? I don't think you need to put it into the Item.java it should be more like this:
{Java Setup Stuff}private static final Item YourItem = new Item(Item Setup Info)
{other Java Stuff}
GameRegistry.addShapelessRecipe(new ItemStack(Item.diamond, 64), new ItemStack(YourItem));
At least I think that will work. OR if your item is in a different package make sure to import it, just play around a bit.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome