mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
Floor values are set for max health, combat regen, health regen, melee damage, and projectile damage when changing them now.
This commit is contained in:
1 parent
cd5b4c0633
commit
3c1bc30e44
6 files changed
+16
-12
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
@@ -49,8 +50,8 @@ public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T
|
||||
/**
|
||||
* @return Entity's max health
|
||||
*/
|
||||
public float getMaxHealth(){
|
||||
return entity.getMaxHealth();
|
||||
public double getMaxHealth(){
|
||||
return entity.getEntityAttribute(SharedMonsterAttributes.maxHealth).getAttributeValue();
|
||||
}
|
||||
/**
|
||||
* @return Whether or not this entity is attacking something
|
||||
|
||||
Reference in new issue
Block a user