Posted May 18, 20169 yr 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) });
May 19, 20169 yr 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/
May 19, 20169 yr 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.
May 19, 20169 yr 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?
May 19, 20169 yr 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) });
May 19, 20169 yr Author I thought you meant the crafting grid in the code, I put this: https://scontent-lhr3-1.xx.fbcdn.net/v/t34.0-12/13236123_1001484379901445_1937307940_n.png?oh=2bb653c43c9223ecbaf985e5aba1ca54&oe=573FA565[/img] With each potion in the grid being the same potion shown. Is this what you meant?
May 19, 20169 yr 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) });
May 19, 20169 yr Author But it doesn't, can you try this out yourself and see if it works for you and if yes then what did you do differently?
May 20, 20169 yr Author And so then why does crafting the potion work but it doesn't work in using it to craft something?
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.