How do I make something happen when the player receives damage?

Started by DarkParty on

Topic category: Help with Minecraft modding (Java Edition)

Active 9 hours ago
Joined Apr 2025
Points:
243

User statistics:

  • Modifications: 3
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 143
How do I make something happen when the player receives damage?

How do I make a procedure happen when the player receives damage?

Active 20 hours ago
Joined Dec 2024
Points:
310

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 6
  • Comments: 99
?_?. Global trigger: Entity…
Mon, 04/28/2025 - 12:22

?_?. Global trigger: Entity received damage

Active 12 hours ago
Joined Apr 2023
Points:
774

User statistics:

  • Modifications: 5
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 583
And an if block that checks…
Mon, 04/28/2025 - 13:20

And an if block that checks if event/target entity is (sub)type of player.

Active 9 hours ago
Joined Apr 2025
Points:
243

User statistics:

  • Modifications: 3
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 143
so basically "do such and…
Mon, 04/28/2025 - 15:05

so basically "do such and such when entity hurt IF entity=player?

Active 12 hours ago
Joined Apr 2023
Points:
774

User statistics:

  • Modifications: 5
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 583
yes, that should work.
Mon, 04/28/2025 - 15:43

yes, that should work.

Active 9 hours ago
Joined Apr 2025
Points:
243

User statistics:

  • Modifications: 3
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 143
K. Thanks!
Mon, 04/28/2025 - 16:19

K. Thanks!

Active 9 hours ago
Joined Apr 2025
Points:
243

User statistics:

  • Modifications: 3
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 143
Where is the "if entity…
Mon, 04/28/2025 - 23:03

Where is the "if entity=player" block or equivalent?

Active 12 hours ago
Joined Apr 2023
Points:
774

User statistics:

  • Modifications: 5
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 583
I'm pretty sure it is in…
Wed, 04/30/2025 - 15:35

I'm pretty sure it is in either logic or minecraft components, it is called something like 'is event/target entity (sub)type of [no entry selected]' at least, that is what it was called in older MCreator versions, and if it has changed, I haven't memorized it yet. You need to click on [no entry selected] to open a dropdown menu to set it to a player.

Active 9 hours ago
Joined Apr 2025
Points:
243

User statistics:

  • Modifications: 3
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 143
I found it, but the other…
Thu, 05/01/2025 - 11:44

I found it, but the other part of the mod didn't work, but this will still be useful. Thanks!