A sword with a chance to deal extra damage

Started by HVDES on

Topic category: Help with modding (Java Edition)

Last seen on 04:08, 6. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A sword with a chance to deal extra damage
Wed, 07/03/2024 - 16:45 (edited)

I'm pretty new.
I made a sword with a certain chance to deal a critical hit. The base damage of the sword is 7, and the critical hit deals 10 damage, it worked. However, when enchanting the sword, the additional damage doesn't increase, so I need it to deal 3 additional damage, even if it's enchanted. Is there any way to achieve this? Please help.

here is the procedure i used. https://imgur.com/a/thAozi5

Edited by HVDES on Wed, 07/03/2024 - 16:45
Last seen on 13:17, 4. Jul 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i think the issue here is…
Wed, 07/03/2024 - 17:36

i think the issue here is that you set the damage dealt to 10. if you want it to deal more damage based on an enchant swap out the 10 for its current attack damage + 3. pretty sure the block is (get damage of provided item stack) then you just put it in a math block and add a "+3"