#How to change wither hp more than 1024.

11 messages · Page 1 of 1 (latest)

somber warren
#

I was trying to change wither max health. i have it 1024 from Wither reincarnated config. I tryed to change the max hp nothing changed i tried then to put absorbion and resistance as potion effect but it didnt work . (i checked the with id and it is minecraft:wither)

livid horizonBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

junior breach
#

For sure there's no MaxHealth method

#

Max health of a living entity is determined by the attribute:

   /**
    * Returns the maximum health of the entity (what it is able to regenerate up to, what it spawned with, etc.)
    */
   public final float getMaxHealth() {
      return (float)this.getAttributeValue(Attributes.MAX_HEALTH);
   }
#

setHealth will clamp the health to its maximum health, so you can't change max health that way

#

You must modify the entity's max health attribute

#

Then set the entity's health to max health using setHealth

somber warren
#

Thanks so far . So there is no need for the potionEffects . But one more thing why it does not take the potion effects?

junior breach
#

Because your script crashes before the potion effects are applied

#

As you try to call a non-existent method

somber warren
#

ah thanks