Detect what entity killed Player?

Started by JustHaven on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Detect what entity killed Player?

I just simply want to do a statement like:

if [Event/target entity] killed by type: (insert mob here)

do (insert code here)

Is there a way to achieve this?

Joined Jan 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make some custom entity tags…
Sat, 01/14/2023 - 04:53

Make some custom entity tags for each entity you need, and make a procedure with the 'entity dies' global trigger. Then run the procedure.Screenshot-2023-01-13-225309

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Or you can try using "is …
Tue, 01/17/2023 - 15:28

Or you can try using "is (sub) type of" procedure with source entity. 

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
any way to make this detect…
Tue, 01/09/2024 - 04:12

any way to make this detect if it was a player that killed another player?