Returns true if the chunk is located near the spawn point
(int x, int z)
| 3856 | * Returns true if the chunk is located near the spawn point |
| 3857 | */ |
| 3858 | public boolean isSpawnChunk(int x, int z) |
| 3859 | { |
| 3860 | BlockPos blockpos = this.getSpawnPoint(); |
| 3861 | int i = x * 16 + 8 - blockpos.getX(); |
| 3862 | int j = z * 16 + 8 - blockpos.getZ(); |
| 3863 | int k = 128; |
| 3864 | return i >= -k && i <= k && j >= -k && j <= k; |
| 3865 | } |
| 3866 | } |
no test coverage detected