Posted July 8, 201312 yr 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!!
July 8, 201312 yr 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; }
July 8, 201312 yr Author 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?
July 8, 201312 yr 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.
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.