Posted June 2, 201510 yr Hey everyone~ Whilst making an infuser block (2 inputs, 1 output, no fuel) I stumbled upon this crash: http://pastebin.com/xztWZ7KH The code that goes with the mod is here: https://github.com/J3FF97/Elemental-Melons/blob/1.7.10/src/main/java/j3ff97/elementalmelons/tileentity/TileEntitySeedInfuser.java The line that apparantly gives a NullPointer is: ItemStack stack = SeedInfuserRecipes.instance().getInfusingResult(slots[0].getItem(), slots[1].getItem()); I've checked and that line should only be null if I would not have specified any recipes, which I did. In another mod this (almost exact) same code is working. Anyone who can enlighten me? ~J
June 2, 201510 yr Author I specify it in a class called CraftingHandler and register it in my commonproxy. SeedInfuserRecipes.addInfusing(Items.melon_seeds, Items.magma_cream, new ItemStack(ModItems.fireMelonSeeds)); That's the line that registers it. I forgot to tell but the crash occurs whenever I place this recipe into the gui. (This is the only recipe I've registered for the block as a test.)
June 2, 201510 yr Author Thanks I checked the load orders, but that did not seem to be a problem It's probably a very minor typo or something like that, knowing myself, but I just can't figure it out
June 2, 201510 yr If you checked the load orders then I don't know. The only thing I could think about is that you might be loading your items after the recipes get initialized, but I don't think you did that. I'm pretty sure you did that right. I'll think some more, if I think of something I will get back to you.
June 2, 201510 yr Author I see what you mean, Weird thing is that I do exactly the same thing in another mod of mine and it works. I should probably get rid of the loop though since as far as I know it does not add anything except for just another crash possibility. Thanks anyways Now I just gotta fix shift clicking and this block is done~
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.