Use foreach loops

This commit is contained in:
mezz committed 2016-10-20 23:13:41 -07:00
1 parent 7a90a5cbbf
commit f96bf5ba5f
3 files changed
+5 -9

No files matched your search

@@ -47,9 +47,8 @@ public class EntityBeeLightning extends EntityLightningBolt {
this.worldObj.setLastLightningBolt(2);
} else {
final double d0 = 3.0;
final List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, new AxisAlignedBB(this.posX - d0, this.posY - d0, this.posZ - d0, this.posX + d0, this.posY + 6.0 + d0, this.posZ + d0));
for (int l = 0; l < list.size(); ++l) {
final Entity entity = (Entity) list.get(l);
final List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, new AxisAlignedBB(this.posX - d0, this.posY - d0, this.posZ - d0, this.posX + d0, this.posY + 6.0 + d0, this.posZ + d0));
for (Entity entity : list) {
entity.onStruckByLightning(this);
}
}