Incrementing attributes in Minecraft



  • I want to figure out how to increment a player's health without writing 225 lines of Datapack code. I cannot find any way to do this. I've tried :

    execute at @a run execute unless score @p custHealth matches 1 run attribute @p generic.max_health base set Health @p 
    

    but that does not work.



  • Try this command (amplifier is no. of hearts)

    /effect give @a health_boost

    Or for permanent use:

    /attribute @a minecraft:generic.max_health base set 2

    In this case 2 means 1 heart, so you enter e.g. 60 for 30 hearts.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2