int currentChunkZ = chunkCoord.getChunkZ();
for (int searchChunkX = currentChunkX - searchRadius; searchChunkX < currentChunkX + searchRadius; searchChunkX++)
{
for (int searchChunkZ = currentChunkZ - searchRadius; searchChunkZ < currentChunkZ + searchRadius; searchChunkZ++)
{
CustomObjectStructure structureStart = world.getStructureCache().getStructureStart(searchChunkX, searchChunkZ);
if (structureStart != null)
{
structureStart.spawnForChunk(chunkCoord);
}
}
}
}