Update ItemBiomeFinder.java
Fixed for-loop range and added missing breaks to improve performance
This commit is contained in:
parent
39ce365b3f
commit
a305036e2e
|
@ -60,7 +60,7 @@ public class ItemBiomeFinder extends Item
|
||||||
int playerX = MathHelper.floor_double(player.posX);
|
int playerX = MathHelper.floor_double(player.posX);
|
||||||
int playerZ = MathHelper.floor_double(player.posZ);
|
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++)
|
for (int z = -10; z <= 10; z++)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +72,7 @@ public class ItemBiomeFinder extends Item
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (finalFoundPosition1 != null) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChunkPosition finalFoundPosition2 = null;
|
ChunkPosition finalFoundPosition2 = null;
|
||||||
|
@ -88,6 +89,7 @@ public class ItemBiomeFinder extends Item
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (finalFoundPosition2 != null) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChunkPosition biomePosition = null;
|
ChunkPosition biomePosition = null;
|
||||||
|
|
Loading…
Reference in New Issue