Jump to content

[1.8.9] Crafting with Potions?


Monstrous_Apple

Recommended Posts

So I have my code, and this does work (like it creates the recipe for the new sword, as proven when I use the 'Just Enough Items' mod, it shows the recipe) but it doesn't craft the item using these potions, if that makes any sense then does anyone know why it doesn't work?

 

GameRegistry.addRecipe(new ItemStack (MAItems.InvisiBlade),
			new Object [] {
					"   ",
					"BB ",
					"AB ",
					'A', MAItems.ObsidianSword,
					'B', new ItemStack (Items.potionitem, 1, 14)
	});

Link to comment
Share on other sites

I don't think you can have empty pairs of quotation marks when registering a recipe. Try removing them.

Colore - The mod that adds monochrome blocks in every color of the rainbow!

http://www.minecraftforge.net/forum/index.php?topic=35149

 

If you're looking to learn how to make mods for 1.9.4, I wrote a helpful article with links to a lot of useful resources for learning Minecraft 1.9.4 modding!

 

http://supergeniuszeb.com/mods/a-helpful-list-of-minecraft-1-9-4-modding-resources/

Link to comment
Share on other sites

For starters, don't pad your recipes with blank lines or columns. It looks like you have a shaped 2x2 recipe, so write two lines of two char each.

 

Then set some break points and step through the process of updating the crafting table's output. Add an ingredient and see what goes wrong.

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.

Link to comment
Share on other sites

This is the exact code, the 1, 14 part is used to craft something into a Invisible Potion (3:00) but I can't craft using it?

 

GameRegistry.addRecipe(new ItemStack (MAItems.InvisiBlade),
			new Object [] {
					"BBB",
					"BBB",
					"BAB",
					'A', MAItems.ObsidianSword,
					'B', new ItemStack (Items.potionitem, 1, 14)
	});

Link to comment
Share on other sites

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.