Add more hearts

Started by Thedoom19 on

Topic category: Help with modding (Java Edition)

Last seen on 11:19, 24. Jan 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add more hearts

I want it so when you use an item you get 1 heart

Last seen on 11:19, 24. Jan 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Permanently)
Sat, 06/11/2022 - 16:28

(Permanently)

Last seen on 12:31, 22. Jan 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
idk the full details but…
Sat, 06/11/2022 - 17:49

idk the full details but this requires the health boost effect

when the player uses the item, run a procedure

if the player does not have health boost, give them health boost level 0 (mcreator interprets level 0 as level 1)

if the player has health boost, increase its level by 1

see if that works

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can use the "Execute…
Sat, 06/11/2022 - 18:40

You can use the "Execute command /" code block (found under Entity Management) to set the player's max health attribute.

For example, plugging in the following:

attribute @s minecraft:generic.max_health base set 30

will set the max health of the target entity to 30 (15 hearts).

 

NOTE:  Attributes will reset up death, so to make a permanent change, you will have to keep track of the effect with a global variable and reapply it upon player respawn.