how do I damage peopl in a radius

Started by bobert1201 on Sun, 11/15/2015 - 16:24
Last seen on 16:39, 15. Nov 2015
Joined Apr 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
how do I damage peopl in a radius
Sun, 11/15/2015 - 16:24

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

Last seen on 13:48, 18. Aug 2018
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
Try something like this: 
Mon, 11/16/2015 - 14:45

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;
 

}