How to make something happen to a mob that hits a player?

Started by DancatGamer on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make something happen to a mob that hits a player?

How to make something happen to a mob that hits a player?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You want to use the global…
Wed, 01/24/2024 - 15:19

You want to use the global trigger 'before entity hurt.' Then use an if bracket to check if the event/target entity, (the one being hurt), is your custom entity, and the source entity, (the one attacking), is a subtype of 'player.' You should be able to find everything you need in the logic and flow-control tabs.

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If anything, I'm on versions…
Wed, 01/24/2024 - 15:34

If anything, I'm on versions 2023.2

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...These functions should be…
Wed, 01/24/2024 - 17:00

...These functions should be available in that version? I'm not sure I understand.