@@ -90,7 +90,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setMaxHealth(double amount) {
|
||||
Validate.isTrue(amount > 0, "Max health must be greater than 0");
|
||||
|
||||
getHandle().a(GenericAttributes.a).a(amount);
|
||||
getHandle().getAttributeInstance(GenericAttributes.a).setValue(amount);
|
||||
|
||||
if (getHealth() > amount) {
|
||||
setHealth(amount);
|
||||
|
||||
@@ -64,6 +64,12 @@ public class CraftPotionEffectType extends PotionEffectType {
|
||||
return "POISON";
|
||||
case 20:
|
||||
return "WITHER";
|
||||
case 21:
|
||||
return "HEALTH_BOOST";
|
||||
case 22:
|
||||
return "ABSORPTION";
|
||||
case 23:
|
||||
return "SATURATION";
|
||||
default:
|
||||
return "UNKNOWN_EFFECT_TYPE_" + handle.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user