Adding damage percentage to my attack when dual wielding ?

Started by MilqueToast on

Topic category: Help with modding (Java Edition)

Last seen on 17:45, 14. Feb 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Adding damage percentage to my attack when dual wielding ?
Thu, 02/10/2022 - 09:18 (edited)

So what I'm trying to achieve is that, if I dual wield 2 stone swords in main and off hands, my attack damage would increase by 10%. means it would deal 5.5 damage each swing.

But this doesnt seem to work as intended as when i input the following code block, a husk dies with only 2 hits. Can anyone guide me through this ?

My code block :-

https://ibb.co/4s0pTMS

Edited by MilqueToast on Thu, 02/10/2022 - 09:18
Last seen on 17:38, 6. Mar 2024
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This might be caused by…
Thu, 02/10/2022 - 10:30

This might be caused by invincibility frames.

Last seen on 17:45, 14. Feb 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry but could you…
Thu, 02/10/2022 - 11:33

I'm sorry but could you elaborate

Last seen on 11:41, 31. Mar 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I mean, it works as intended…
Tue, 02/22/2022 - 17:01

I mean, it works as intended yes?

You deal (atleast) 10 damage to the Husk because of the code, and I think husk has around 20 HP so it dies in two hits.