mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
quick fix : 'while' loop replaceable with enhanced 'for' loop
This commit is contained in:
1 parent
d6b69264b9
commit
7abe2f5182
17 files changed
+62
-111
No files matched your search
@@ -84,17 +84,15 @@ public class LaunchedPotion extends EntityThrowable {
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition par1MovingObjectPosition) {
|
||||
if (!this.worldObj.isRemote) {
|
||||
List list = Items.potionitem.getEffects(this.potionDamage);
|
||||
List<PotionEffect> list = Items.potionitem.getEffects(this.potionDamage);
|
||||
|
||||
if (list != null && !list.isEmpty()) {
|
||||
AxisAlignedBB axisalignedbb = this.boundingBox.expand(4.0D, 2.0D, 4.0D);
|
||||
List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
List<EntityLivingBase> list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
|
||||
if (list1 != null && !list1.isEmpty()) {
|
||||
Iterator iterator = list1.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityLivingBase entityliving = (EntityLivingBase) iterator.next();
|
||||
for (EntityLivingBase entityliving : list1) {
|
||||
double d0 = this.getDistanceSqToEntity(entityliving);
|
||||
|
||||
if (d0 < 16.0D) {
|
||||
@@ -104,10 +102,7 @@ public class LaunchedPotion extends EntityThrowable {
|
||||
d1 = 1.0D;
|
||||
}
|
||||
|
||||
Iterator iterator1 = list.iterator();
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
PotionEffect potioneffect = (PotionEffect) iterator1.next();
|
||||
for (PotionEffect potioneffect : list) {
|
||||
int i = potioneffect.getPotionID();
|
||||
|
||||
if (Potion.potionTypes[i].isInstant()) {
|
||||
|
||||
Reference in new issue
Block a user