Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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)
	});

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/

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.

  • Author

Yeah I see what you mean and I tried it doing like this:

 

"AAA"

"AAA"

"AAA"

 

A = The Potion

 

And this is to create a stone sword (just to test it) but it still doesn't work?

  • Author

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)
	});

  • Author

I've already done that, unless you both mean something different?

 

Is this not correct?:

 

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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.