oops util ent new method didn't commit in last commit

This commit is contained in:
NewGarbo 2015-11-26 07:29:59 +00:00
parent c0cfdf9785
commit 56d5c10481

View File

@ -541,6 +541,18 @@ public class UtilEnt
}
return false;
}
public static boolean isGrounded(Entity ent, Location loc)
{
AxisAlignedBB box = ((CraftEntity)ent).getHandle().getBoundingBox();
Location bottom_corner_1 = new Location(ent.getWorld(), box.a, loc.getY()-0.1, box.c);
Location bottom_corner_2 = new Location(ent.getWorld(), box.d, loc.getY()-0.1, box.f);
for(Block b : UtilBlock.getInBoundingBox(bottom_corner_1, bottom_corner_2)){
if(UtilBlock.solid(b)) return true;
}
return false;
}
public static void PlayDamageSound(LivingEntity damagee)
{