So I'm working on a mod that involved cocoa beans and lapis lazuli, and I tried to use cocoa beans in a recipe. I already tried this code as said in other threads:
Character.valueOf('C'), new ItemStack(Item.dyePowder, 1, 3)
But it still didn't work, due to the fact that Eclipse, the text editor and compiler that I use, says that "dyePowder" cannot be resolved or is not a field. I'm new to modding and this language in general, so I'd appreciate any help given.
The identifier comes before the dye. It should look something similar to this:
GameRegistry.addRecipe(new ItemStack(itemChocolateCookieDough, 1), new Object[] {
" C ",
" D ",
" S ",
'D', itemDough,
'S', Items.sugar,
'C', new ItemStack(Items.dye, 1, 3)
});
I'm sorry, and I now know how to use dye in a crafting recipe since it is metadata sensitive, but I still don't know how to use it in smelting recipes. This tutorial is good and all, but I must be blind or just plain dumb because I can't figure out how to do this. I'm sorry to bother.
Oh, I just purely guessed, and I think I got it:
GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 4), new ItemStack (itemLapisLazuliIngot), 0.7F);
I think this is the one, I'm going to test it out;
No worries! Was hoping you'd catch on to that. Programming is a skill that comes with time, just like anything else - it might feel like you're getting in over your head, but just keep practicing like this and you'll start to catch on to newbie mistakes like that.
So I'm working on a mod that involved cocoa beans and lapis lazuli, and I tried to use cocoa beans in a recipe. I already tried this code as said in other threads:
But it still didn't work, due to the fact that Eclipse, the text editor and compiler that I use, says that "dyePowder" cannot be resolved or is not a field. I'm new to modding and this language in general, so I'd appreciate any help given.
Use Item.dye instead of Item.dyePowder
I try to, but I crash due to this line of code:
Any idea?
The identifier comes before the dye. It should look something similar to this:
Thank you so much, it worked. I can finally progress in my mod.
Okay, so I'm just wondering how I would do this with smelting. So far I have
and have no Idea how to implement lapis into the equation. Sorry to bother again. I'd appreciate any help.
Give this guy's tutorials a read, you're making some very fundamental coding mistakes.
I'm sorry, and I now know how to use dye in a crafting recipe since it is metadata sensitive, but I still don't know how to use it in smelting recipes. This tutorial is good and all, but I must be blind or just plain dumb because I can't figure out how to do this. I'm sorry to bother.
Oh, I just purely guessed, and I think I got it:
I think this is the one, I'm going to test it out;
And it worked. Thank you for your help
No worries! Was hoping you'd catch on to that. Programming is a skill that comes with time, just like anything else - it might feel like you're getting in over your head, but just keep practicing like this and you'll start to catch on to newbie mistakes like that.