Started by
Bo-Katan22
on
Topic category: Help with Minecraft modding (Java Edition)
I'd like to make it so that if you're holding 2 daggers, one in each hand, they both work and do damage together.
Unfortunatly I can't use plugins, so if there's another way I'd really like to find out.
Thanks!
Sort of!
Minecraft doesn't normally like letting you use stuff in the off hand while there's something in their main hand. ...However, if you're willing to brute force it, you can make a procedure with the 'before entity is hurt' trigger, and check if the item in the source entity's off hand is your dagger. (Or if you want it to only be dual wielded with another dagger, checks if the item in their off hand and the item in their main hand are both daggers.)
If it is, you can then just deal damage equal to the item's attack power to the event/target entity. (And probably also remember to deal durability damage to the item in the source entity's off hand.) There's even a function to swing the source-entity's off-hand to make it appear like they're attacking with it, even if it's technically just running the attack through the main hand.
Hope that helps!
Thank you very much! I'll try it out.