How to temporarily change a sword's damage?

Started by I N E R T I A on

Topic category: Help with Minecraft modding (Java Edition)

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?

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.