how do I damage peopl in a radius

2 posts / 0 new
Last post
Offline
Last seen: 1 year 6 months ago
Joined: 04/02/2014 - 21:55
Gems: 0
how do I damage peopl in a radius

I want to make the projectile for my gun have an area of effect but not destroy blocks with an explosion. Please help me



Offline
Last seen: 13 hours 3 min ago
Joined: 08/27/2013 - 18:03
Gems: 314
Try something like this: 

Try something like this: 


AxisAlignedBB axisalignedbb = getCollisionBoundingBoxFromPool(x , y, z ,x1 , y1, z1);


List list = world.getEntitiesWithinAABB(EntityLivingBase , axisalignedbb);


for(Entity entity : list) {


entity.isDead = true;
 

}