How to temporarily change a sword's damage?

Started by I N E R T I A on

Topic category: Help with modding (Java Edition)

Last seen on 17:43, 20. Jul 2024
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to temporarily change a sword's damage?

How do I temporarily change a sword's damage? For example, I have a modded sword that does 4 damage ordinarily. I want it to do 5 damage when you unlock a perk. How do I do this?

Last seen on 09:12, 19. Jul 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make it so if the player has…
Wed, 07/10/2024 - 23:21

Make it so if the player has the perk, a variable is set to true. When a living entity is hit with it, check if the variable is true, and if so, deal extra damage.