Minecraft wiki entry for End_City, associated text: Relevant code: int i = chunkX; int j = chunkZ; if (chunkX < 0) chunkX -= 19; if (chunkZ < 0) chunkZ -= 19; int k = chunkX / 20; int l = chunkZ / 20; Random random = this.worldObj.setRandomSeed(k, l, 10387313); k = k * 20; l = l * 20; k = k + (random.nextInt(9) + random.nextInt(9)) / 2; l = l + (random.nextInt(9) + random.nextInt(9)) / 2; return i == k && j == l && this.endProvider.isIslandChunk(i, j);