Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

New Sword in forge


Recommended Posts

Ive been trying to make a new sword in forge forever!! Ive tried everything! Nothing works, Im modding in 1.6.1 so keep that in mind. My mod will include alot of swords, possibly 150, so i dont wanna create a new tool material for each one, is there an item constructor i can add to my public static final Item code? Please help as I need this for my mod to work!!

Link to post
Share on other sites

This method appears to be what sets weapon damage now:

    public Multimap func_111205_h()
    {
        Multimap multimap = super.func_111205_h();
        multimap.put(SharedMonsterAttributes.field_111264_e.func_111108_a(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.weaponDamage, 0));
        return multimap;
    }

Link to post
Share on other sites

This method appears to be what sets weapon damage now:

    public Multimap func_111205_h()
    {
        Multimap multimap = super.func_111205_h();
        multimap.put(SharedMonsterAttributes.field_111264_e.func_111108_a(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.weaponDamage, 0));
        return multimap;
    }

 

Where should i put this in my Mod_***** file?

Link to post
Share on other sites

The way I would do it is I would create just one class, and have the constructor be something like

 

public int whichSword
public Item Sword;

public ItemSwords(int par1, EnumToolMaterial par2EnumToolMaterial, int par3){
this.whichSword = par3
this.getSword(par3) = this.sword
super (par1, par2EnumToolMaterial)
}

 

You could then have getSword return which sword you wanted, and then make a method that sets the attributes of that sword based on what getSword returned.

 

As for that other method, it looks like it already exists, so you could just call it and say you want the sword to have that attribute.  You could copy it into your mod_XXX file and call it from there if you wanted.

Link to post
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.

Guest
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 Privacy Policy.