How to set the damage in a procedure to player's damage?

Started by myxical on

Topic category: Help with modding (Java Edition)

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to set the damage in a procedure to player's damage?
Sat, 10/09/2021 - 21:11 (edited)

What I mean is when an entity dies to some custom damage I want to set who killed the entity.
Example: player performs a special aoe attack and deals custom damage to surrounding mobs, but mob kills don't count as player kills (doesn't show in statistics that you killed that mob in statistics, no player kill only loot dropped, no experience dropped)

How do I do that?

Oh also I noticed when you first hit the mob and then deal the custom damage the localization changes to death.attack.name.player. How do I force it to always be .player?

Edit: How do I also make it so it doesn't pass through armor?

Scratch all of that. I found out there's a death.attack.player in vanilla. How do I apply it to my procedure? I don't see it on the list.

Edited by myxical on Sat, 10/09/2021 - 21:11
Last seen on 08:50, 3. May 2024
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can use the new damage…
Tue, 08/08/2023 - 12:47

You can use the new damage command introduce in 1.19.4 to do this.

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I forgot that exists, thank…
Tue, 08/08/2023 - 17:07

I forgot that exists, thank you. Still, it should be added as a procedure block. This just seems unofficial.