1

Need help with coding

Pixxel 6/5/13 4:07 pm
225
6/6/2013 12:54 pm
I have been modding for a while now and just started with forge and I have been getting this error message when I try and do the crafting code


This is how I put it


GameRegistry.addRecipe = new ItemStack(topazblock,1, new Object[]{
emerald,emerald,item.stick,
});

It has an error on "addRecipie" saying I need a variabledeclaratorID after it, I have never seen this before, if this is wrong can someone please tell me
Posted by
Pixxel
Level 22 : Expert Modder
17

  Have something to say?

JoinSign in

3

Leikaru
06/06/2013 12:54 pm
Level 37 : Artisan Modder
You should put the actual recipe outside the ItemStack. like so
GameRegistry.addRecipe(new ItemStack(topazblock,1),blah blah blah);
1
nickfromgreece
06/06/2013 11:47 am
Level 54 : Grandmaster Programmer
PixxelI have been modding for a while now and just started with forge and I have been getting this error message when I try and do the crafting code


This is how I put it


GameRegistry.addRecipe = new ItemStack(topazblock,1, new Object[]{
emerald,emerald,item.stick,
});

It has an error on "addRecipie" saying I need a variabledeclaratorID after it, I have never seen this before, if this is wrong can someone please tell me




Just realised you derped so hard GameRegistry.addRecipe is a METHOD not a variable what you are saying here is that you have a variable called addRecipe and youre giving it a value...


WRONG!

What you actually need to do is call the method so it is:

GameRegistry.addRecipe(new ItemStack(topazblock,1, new Object[]{
emerald,emerald,item.stick,
}));
1
froghog
06/06/2013 11:36 am
Level 63 : High Grandmaster Modder
what shape are you making it in?
EES?
if you tell me how you'd like to make it in game, just tell me in the
XXX
XXX
XXX
shape then i could help you with the code.
1

Welcome