Hello when I recompile my mod it doesnt report any errors but when I test it in game my game crashes on startup because of a null pointer exception, Im guessing its coming from the lines below as it works perfectly fine without them, but they are needed for the crafting recipes.
YOU DONT NEED TO ADD SHIFTED INDEX. ive seen many people for some reason typing shifted index at the end.
you do not need it. it will just crash the game.
Hello when I recompile my mod it doesnt report any errors but when I test it in game my game crashes on startup because of a null pointer exception, Im guessing its coming from the lines below as it works perfectly fine without them, but they are needed for the crafting recipes.
Yeah you don't need .shifted index for Item.stick
Also, is ammyIngot defined in this mod file? If so you don't need to put the mod name in for that either.
ModLoader.AddRecipe(new ItemStack(ammyPick, 1), new Object[] {
"***", " ^ ", " ^ ", Character.valueOf('*'), mod_AmethystIngot.ammyIngot, Character.valueOf('^'), Item.stick.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(ammyAxe, 1), new Object[] {
"**", "*^ ", " ^ ", Character.valueOf('*'), mod_AmethystIngot.ammyIngot, Character.valueOf('^'), Item.stick.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(ammySpade, 1), new Object[] {
" * ", " ^ ", " ^ ", Character.valueOf('*'), mod_AmethystIngot.ammyIngot, Character.valueOf('^'), Item.stick.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(ammyHoe, 1), new Object[] {
"** ", " ^ ", " ^ ", Character.valueOf('*'), mod_AmethystIngot.ammyIngot, Character.valueOf('^'), Item.stick.shiftedIndex
});
ModLoader.AddRecipe(new ItemStack(ammySword, 1), new Object[] {
" * ", " * ", " ^ ", Character.valueOf('*'), mod_AmethystIngot.ammyIngot, Character.valueOf('^'), Item.stick.shiftedIndex
});
I'l PM it to ya
EDIT: we fixed the null pointer exception error but now im getting a different error shown below
The fix, You notice something about ALL the codes?
No? Well it's your recipe (of course). Your problem is item.stick.shiftedIndex
Try taking out the .shiftedIndex at the end!
if that doesn't work, Tell me.
Also, Don't forget to capitalize "Item".
you do not need it. it will just crash the game.
Did i help or entertain you in any way? Click the up arrow in the corner, thanks!
Did i help or entertain you in any way? Click the up arrow in the corner, thanks!
Yeah you don't need .shifted index for Item.stick
Also, is ammyIngot defined in this mod file? If so you don't need to put the mod name in for that either.
like so
Character.valueOf('*'), ammyIngot,