use of com.builtbroken.mc.prefab.entity.selector.EntityDistanceSelector in project Engine by VoltzEngine-Project.
the class BlastBasic method doEffectOther.
@Override
public void doEffectOther(boolean beforeBlocksPlaced) {
if (!beforeBlocksPlaced) {
// TODO wright own version of getEntitiesWithinAABB that takes a filter and cuboid(or Vector3 to Vector3)
// TODO ensure that the entity is in line of sight
// TODO ensure that the entity can be pathed by the explosive
AxisAlignedBB bounds = AxisAlignedBB.getBoundingBox(x - size - 1, y - size - 1, z - size - 1, x + size + 1, y + size + 1, z + size + 1);
List list = world.selectEntitiesWithinAABB(Entity.class, bounds, new EntityDistanceSelector(new Pos(x, y, z), size + 1, true));
if (list != null && !list.isEmpty()) {
damageEntities(list, source);
}
}
}
Aggregations