Refactoring: get rid of outer loop

This commit is contained in:
Disasm 2013-07-09 21:22:25 +04:00
parent 79a71b7c64
commit d99fbb398c

View file

@ -217,7 +217,7 @@ public class EntityJump extends Entity {
* @return
*/
public boolean checkForChunksGeneratedIn(World w) {
for (int y = minY; y <= maxY; y++) {
// TODO: ходить не по координатам, а по координатам чанков, так быстрее.
for (int x = Xmin; x <= Xmax; x++) {
for (int z = Zmin; z <= Zmax; z++) {
final int newX = getNewXCoord(x, 0, z, this.distance, this.dir);
@ -234,8 +234,6 @@ public class EntityJump extends Entity {
}
}
}
}
return true;
}