Jump to content

Using Clay in Shaped Crafting Recipes


Recommended Posts

Hey all,


So I have been working on some modding and I keep running into an error. Basically, I have a shaped crafting recipe that uses Stone, Clay, and a Water bucket. However, I cannot add the clay to the recipe without it crashing. This is what I have been trying:


addRecipe(new ItemStack(pasteCement, 1) new Object[]{"XYZ", "AZZ", 'X', Block.stone, 'Y', Material.clay, 'A', Item.bucketWater});


Causes a null pointer exception on that line. No idea what's wrong or - apparently - how to use clay in a recipe.


Any thoughts?

Link to comment
Share on other sites

Just to clarify, is that for clay balls?


I did try it and Block.clay does not work. I never posted before but its forge965 for Minecraft 1.6.4. Not sure if that makes a difference or not. I realize there is a BlockClay class, do I need to use that at all?

Link to comment
Share on other sites

No, that was for clay blocks. For clay balls, use Item.clay_ball or something like that. I'm not sure what the name is in 1.6.4. Material.clay is information for the clay block to use. It will not work in crafting recipes. Also, if you are trying to make it for clay blocks and Block.clay didn't work, just look in the Block.class for the name.

Check out my mod, Realms of Chaos, here.


If I helped you, be sure to press the "Thank You" button!

Link to comment
Share on other sites

*Sigh* Please tell me you guys have made a mod in 1.7 or at least learned the new system.


It's Items.class and Blocks.class instead of Item.class and Block.class


In 1.6.4, use Item and Block, but for 1.7, it's Items and Blocks.


Enjoy! :D



Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)


If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

Item.clay worked. Just like that, Item.clay. I figured it was something stupily simple because no one else seemed to have the problem. I guess I must have had some typos or something when I tried Item.clay, probably because I used Item.clay like an idiot. Thanks for the help.

Link to comment
Share on other sites

This topic is now closed to further replies.


  • Create New...

Important Information

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