@Override
public void removeAttributeModifiers(LivingEntity livingEntity, AttributeMap attributeMap, int pAmplifier) {
super.removeAttributeModifiers(livingEntity, attributeMap, pAmplifier);
if (livingEntity.isAffectedByPotions()) {
livingEntity.setHealth(livingEntity.getMaxHealth() - ((float) pAmplifier));
}
}
I want to Decrease Max HP of Entity with potion Effect
This code is acutally work, But what i Expected
This code only decrease current hp not the MaxHp