Posted March 15, 201312 yr I used this as an example to placed customized effects to item when crafting same Items but with difference recipes yielding different custom effects. To be clear: I used Negative numbers for display purposes only (while in output slot). Using positive numbers makes the new items to appear damaged, while negative numbers do not. Example: This allowed to placing a different enchant on the item while crafting the item in two ways. GameRegistry.addShapelessRecipe(new ItemStack(mod_HarkenScythe.HSTalisman, 1, -1), new Object[] { new ItemStack(mod_HarkenScythe.HSTalisman), new ItemStack(mod_HarkenScythe.HSSoulVessel, 1, 20) }); GameRegistry.addShapelessRecipe(new ItemStack(mod_HarkenScythe.HSTalisman, 1, -2), new Object[] { new ItemStack(mod_HarkenScythe.HSTalisman), new ItemStack(mod_HarkenScythe.HSBloodVessel, 1, 40) }); However Mojang added this to the Itemstack Constructor.... D: public ItemStack(int par1, int par2, int par3) { this.stackSize = 0; this.itemFrame = null; this.itemID = par1; this.stackSize = par2; this.itemDamage = par3; if (this.itemDamage < 0) { this.itemDamage = 0; } } if (this.itemDamage < 0) { this.itemDamage = 0; } Is there a new way to get around this problem? or a possiblity to have Forge remove that bit of added code as a Pull Request? http://i715.photobucket.com/albums/ww155/JadeKnightblazer/AsgardShieldBannermain.png[/img]
March 23, 201312 yr Hey, i think i've the same problem with my piece of code that works well in 1.4.7. GameRegistry.addRecipe(new ItemStack(Item.swordWood), new Object[] {" Y ", " X ", " ", 'X', new ItemStack(Item.swordWood, 1, -1), 'Y', Block.planks}); I'm using Forge 1.5.1-7.7.0.605. Any ideas?
March 23, 201312 yr So enchant the item and put the enchanted item in the recipe? ItemStack enchantedTalisman = new ItemStack(/* stuff goes here */); /* enchant the item here */ GameRegistry.addRecipe(enchantedTalisman, /* recipe goes here */);
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.