Update ItemBiomeFinder.java

Fixed for-loop range and added missing breaks to improve performance
This commit is contained in:
wwrpg 2015-05-04 11:31:32 -07:00
parent 39ce365b3f
commit a305036e2e
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,7 @@ public class ItemBiomeFinder extends Item
int playerX = MathHelper.floor_double(player.posX);
int playerZ = MathHelper.floor_double(player.posZ);
for (int x = 10; x <= 10; x++)
for (int x = 10; x >= -10; x--)
{
for (int z = -10; z <= 10; z++)
{
@ -72,6 +72,7 @@ public class ItemBiomeFinder extends Item
break;
}
}
if (finalFoundPosition1 != null) break;
}
ChunkPosition finalFoundPosition2 = null;
@ -88,6 +89,7 @@ public class ItemBiomeFinder extends Item
break;
}
}
if (finalFoundPosition2 != null) break;
}
ChunkPosition biomePosition = null;