I posted about this for 1.9 a while ago, but that method seems to not be working anymore. Is there a good way to change a tools attack speed and damage in 1.11.2?
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
ItemHoe adds an ATTACK_DAMAGE modifier with amount 0. ItemKama replaces this with a modifier that has amount 0 * 1.5, which is still 0.
The grey attack damage/speed values you see on item tooltips include the player's base stats, so "1 Attack Damage" is the base value of 1 plus the modifier amount of 0.
You'll need to use something other than multiplication when replacing a modifier with amount 0.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I see. So instead of multiplying, could I just change ", courier, monospace">modifier.getAmount() * multiplier to ", courier, monospace">multiplier to set the damage and attack speed directly?
Yes.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I posted about this for 1.9 a while ago, but that method seems to not be working anymore. Is there a good way to change a tools attack speed and damage in 1.11.2?
This still uses AttributeModifiers, it hasn't changed since your original thread for 1.9.
You can see the latest version of the code here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Huh. I was changing the damage of a weapon at it was staying at 1. Maybe I messed something up. I'll go make sure.
It seems that the attack speed is working, but attack damage is staying at 1. I have no idea why.
Post your code.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
http://pastebin.com/6S6k5cjB
Tell me if you need more code.
ItemHoe adds an ATTACK_DAMAGE modifier with amount 0. ItemKama replaces this with a modifier that has amount 0 * 1.5, which is still 0.
The grey attack damage/speed values you see on item tooltips include the player's base stats, so "1 Attack Damage" is the base value of 1 plus the modifier amount of 0.
You'll need to use something other than multiplication when replacing a modifier with amount 0.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I see. So instead of multiplying, could I just change modifier.getAmount() * multiplier to multiplier to set the damage and attack speed directly?
Yes.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I would've done that a long time ago. Thanks!