Jump to content

Recommended Posts

Posted

Ok so whenever I try to craft an item from my mod my game crashes but also how would I make it so I can craft an item using an item from my mod? oh and btw heres the crash report:http://pastebin.com/JdAhYnBG

Posted

coaldust = new coaldust().setUnlocalizedName("coaldust").setTextureName("al:coaldust").setCreativeTab(tabAlchimia);

 

add these methods in the constructor instead.

 

you are not registering your textures try this...

 


if (event.getSide() == Side.CLIENT) {
    		regTexture(blockSau);
    	}

public void regTexture(Item item) {
       Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
    }

Posted

coaldust = new coaldust().setUnlocalizedName("coaldust").setTextureName("al:coaldust").setCreativeTab(tabAlchimia);

 

add these methods in the constructor instead.

 

you are not registering your textures try this...

 


if (event.getSide() == Side.CLIENT) {
    		regTexture(blockSau);
    	}

public void regTexture(Item item) {
       Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
    }

 

No.

Dont use event.getSide() , that is stuff proxies are made for.

Posted

For starters, please use more informative subject lines. A good subject line will draw people who know about your topic. Also, if you care enough to put info into your subject line, then more people will care enough to open your cry for help.

 

Second, the minecraft version is 1.7.10, so let's not mention meshers. To the best of my knowledge, that horror doesn't appear until mc 1.8.

 

Third, the crash was caused by a null pointer exception. Set a breakpoint at the offending statement, run again, and see what's null going into that statement. Then fix your code to give the null pointer an object.

 

From the error message, it's a probably null itemstack, which can follow from a null item. Be sure that you have instantiated (and registered) each of your mod's items before you try to use them in recipes.

 

A null itemStack can also follow from a malformed recipe. Be sure that every recipe defines all of its ingredients. In your code I see a recipe for "pestle" that starts with "ORO", but it only defines ingredient "S". This will fail. I also see a recipe for "crystal" starting with "ORO", and it has FOUR rows of ingredients. Have you defined a mod crafting table with four rows of input? If not, then this too will fail.

 

 

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.