Jump to content

Recommended Posts

Posted

So I've encountered this problem when I try to add a crafting recipe for item from my mod using other items from my mod minecraft crashes on start up. Eclipse doesn't show any errors and I'm not sure what to do. All my items are in base mod class as well as their crafting recipes. However items that are crafted with vanilla minecraft items work just fine. If you need any part of code just let me know. Thanks in advance

 

-S

Posted

Here is the error code

  Reveal hidden contents

 

Posted

cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)
mod.tdm.TdmBase.load(TdmBase.java:34)

Error at line 34 of TdmBase.java, in the load method, at GameRegistry.addRecipe(args) you are giving a null.

Posted

All letters are defined, but I think that those items I used in crafting are unregistered. Could you explain it to me/give me a link where it's explained how to register items?

 

Edit: If you mean by typing public static ItemName under the public class BaseMod then yes I did that, for all items

Posted

this is how i did it :P

"GameRegistry.addRecipe(new ItemStack(ObsidianSword), " O "," O "," R ",'O', ashtonsmod.CondensedObsidian,'R',blazerod); "

Use examples, i have aspergers.

Examples make sense to me.

Posted

So, there are three possible null arguments:

-ObsidianSword

-CondensedObsidian

-blazerod

All those should be initialized before the addRecipe(args) line.

 

You can also try with

GameRegistry.addRecipe(new ItemStack(ObsidianSword), new Object[]{" O "," O "," R ",'O', ashtonsmod.CondensedObsidian,'R',blazerod});

Posted

Ok, so here is the BaseMod.class (TdmBase.java) code:

  Reveal hidden contents

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.