Posted September 5, 20232 yr @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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.