Java Code Examples for net.minecraft.entity.player.EntityPlayer.getAbsorptionAmount()

The following are Jave code examples for showing how to use getAbsorptionAmount() of the net.minecraft.entity.player.EntityPlayer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: ScoreHealthCriteria.java   Source Code and License Vote up 6 votes
public int func_96635_a(List<EntityPlayer> p_96635_1_)
{
    float f = 0.0F;

    for (EntityPlayer entityplayer : p_96635_1_)
    {
        f += entityplayer.getHealth() + entityplayer.getAbsorptionAmount();
    }

    if (p_96635_1_.size() > 0)
    {
        f /= (float)p_96635_1_.size();
    }

    return MathHelper.ceiling_float_int(f);
}
 
Example 2
Project: BaseClient   File: ScoreHealthCriteria.java   Source Code and License Vote up 6 votes
public int func_96635_a(List<EntityPlayer> p_96635_1_)
{
    float f = 0.0F;

    for (EntityPlayer entityplayer : p_96635_1_)
    {
        f += entityplayer.getHealth() + entityplayer.getAbsorptionAmount();
    }

    if (p_96635_1_.size() > 0)
    {
        f /= (float)p_96635_1_.size();
    }

    return MathHelper.ceiling_float_int(f);
}