Jump to content

1.5 Killed Customized Item crafting with negative damge by zeroing Item damage!?


Recommended Posts

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?

Link to comment
Share on other sites

  • 2 weeks later...

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?

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.



×
×
  • Create New...

Important Information

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