How to heal player?

Started by Mdzdm on

Topic category: Help with modding (Java Edition)

Last seen on 14:54, 26. Apr 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to heal player?

How to heal player when player hit the Living Entity? Like Life leaching

Last seen on 23:28, 4. May 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use 'set [entity]'s health…
Wed, 04/24/2024 - 23:40

Use 'set [entity]'s health to (current health of [entity] + 1)'

In the example above, the entity would heal half a heart (because 1 damage unit = half a heart). You can freely swap out the +1 for whatever value you'd like to use.

Like the image below, if it loads

Last seen on 14:54, 26. Apr 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It was healing only the mob…
Thu, 04/25/2024 - 01:51

It was healing only the mob that got hit not the player. What procedure do I need to put that?

Last seen on 23:28, 4. May 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the source entity…
Fri, 04/26/2024 - 12:32

Use the source entity instead. The source entity is the entity that initiated the trigger- or the 'source'.

And for future reference, 'immediate source entity' refers to the entity that directly caused the trigger. Like, for example, a player shoots a mob with a bow, the event/target entity is the mob, the source entity is the played and the immediate source entity is the arrow. 

Last seen on 14:54, 26. Apr 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thankx
Fri, 04/26/2024 - 14:54

thankx

Last seen on 23:28, 4. May 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
np
Fri, 04/26/2024 - 22:40

np