How to make a shotgun deal damage properly?

Started by AAAAAAAAAAAAAA… on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a shotgun deal damage properly?

I'm trying to add a shotgun to my mod, but I need to know how to make it so that the damage of all pellets that hit a mob add up?

Like, currently, if I shoot a mob, it will always deal 4 damage because that's how much a single pellet deals, and the damage system nullifies all of the other pellets. If all 5 pellets hit a mob, it should deal 20 damage, but it doesn't!

How can I code this?