Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-165492

Health component does not work properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.60.24 Preview, 1.19.51
    • Survival
    • Confirmed
    • Windows
    • 950902

      All methods on the health component:

      • resetToDefaultValue
      • resetToMaxValue
      • resetToMinValue
      • setCurrent

      Are not working, example code:

      world.events.entityHurt.subscribe(data => {
        data.hurtEntity.getComponent("health").setCurrent(1)
      }) 

      Expected result:
      It should set the current health of the entity you hit to 1

      Observed result:
      The health of the entity you hit does not change at all.

      Note: only tested on entities, not players.

            CodeGeek01 CodeGeek01
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: