I'm new to modding and I made a new item, But when I incorporated the item into a crafting recipe that involves diamond there is an error with item. diamond. What do I do???
src\minecraft\net\minecraft\src\mod_mymod.java:10: not a statement
"XXX", "XYX", "XXX, Character.valueOf('X'), Item.egg}); Character.valueOf('Y'); Item.diamond});
This is the error
it's kinda hard to help you without it
I'm a cat.
oh, i see what your problem is then
it is item.diamond, without the space
I'm a cat.
ModLoader.addRecipe(new ItemStack(ingotGold, 8), new Object[] {
"XXX", "XYX", "XXX", Character.valueOf('X'), Item.egg}); Character.valueOf('Y'); Item.diamond});
"XXX", "XYX", "XXX, Character.valueOf('X'), Item.egg}); Character.valueOf('Y'); Item.diamond});
This is the error
ModLoader.addRecipe(new ItemStack(ingotGold, 8), new Object[] {
"XXX", "XYX", "XXX", Character.valueOf('X'), Item.egg, Character.valueOf('Y'); Item.diamond});
Also, if you're referring to the default gold ingot, you'll want Item.ingotGold.
ModLoader.addRecipe(new ItemStack(ingotGold, 8), new Object[] {
"XXX", "XYX", "XXX", Character.valueOf('X'), Item.egg, Character.valueOf('Y'), Item.diamond});
Also, I suggest you fully learn Java before modding it gets much easier that way.