Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-178297

Custom Health/Max Health

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 20w15a
    • None
    • Unconfirmed
    • (Unassigned)

      If you want to summon a mob with a custom amount of health:

      /summon minecraft:zombie ~ ~ ~ {Health:700f,Attributes:[

      {Name:generic.maxHealth,Base:700}

      ]}

      the zombie will not be given 700 health, it will only be given its normal max health of 20 (you can see this by using /data get entity @e[type=zombie,limit=1] Health.

      I have this command: "/data merge entity @e[type=zombie,limit=1] {Health:700f,Attributes:[

      {generic.maxHealth,Base:700}

      ]} in a repeating command block to constantly update its health but it stays at 20.

      I tried the same set-up in 1.15.2 and it worked and using the "/data get" command above the zombie had 700 health, but in 20w15a it would max at 20.

            Unassigned Unassigned
            jjirwin777 Josh I
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: