Source:
<code>private static void activateChunkTileEntities(final List<EntityPlayerMP> players, final Chunk chunk) { final long currentTick = SpongeImpl.getServer().getTickCounter(); for (final Map.Entry<BlockPos, TileEntity> mapEntry : chunk.getTileEntityMap().entrySet()) { final TileEntity tileEntity = mapEntry.getValue(); final ActivationCapability spongeTileEntity = (ActivationCapability) tileEntity; if (spongeTileEntity.activation$getSpongeTickRate() <= 0 || !((TileEntityBridge) tileEntity).bridge$shouldTick()) { continue; } if (!(tileEntity instanceof ITickable) || spongeTileEntity.activation$getActivatedTick() == currentTick) { continue; } final Vector3i tilePos = VecHelper.toVector3i(tileEntity.getPos()); if (currentTick > ((ActivationCapability) tileEntity).activation$getActivatedTick()) { if (spongeTileEntity.activation$getDefaultActivationState()) { ((ActivationCapability) tileEntity).activation$setActivatedTick(currentTick); continue; } if (spongeTileEntity.activation$requiresActivationCacheRefresh()) { TileEntityActivation.initializeTileEntityActivationState(tileEntity); spongeTileEntity.activation$requiresActivationCacheRefresh(false); } final int bbActivationRange = ((ActivationCapability) tileEntity).activation$getActivationRange(); for (EntityPlayerMP player : players) { final Vector3i playerPos = VecHelper.toVector3i(player.getPosition()); <START> final int blockDistance = Math.round(tilePos.distance(playerPos)); <END> if (blockDistance <= bbActivationRange) { ((ActivationCapability) tileEntity).activation$setActivatedTick(currentTick); break; } } } } }</code><technical_language>While performance, I if making this dependent distance squared. I realise some difference bbActivationRange Math.round() - activation range Math.pow(bbActivationRange - 0.5, 2) due current rounding, rounding required</technical_language>

Target:
private static void activateChunkTileEntities(final List<EntityPlayerMP> players, final Chunk chunk) { final long currentTick = SpongeImpl.getServer().getTickCounter(); for (final Map.Entry<BlockPos, TileEntity> mapEntry : chunk.getTileEntityMap().entrySet()) { final TileEntity tileEntity = mapEntry.getValue(); final ActivationCapability spongeTileEntity = (ActivationCapability) tileEntity; if (spongeTileEntity.activation$getSpongeTickRate() <= 0 || !((TileEntityBridge) tileEntity).bridge$shouldTick()) { continue; } if (!(tileEntity instanceof ITickable) || spongeTileEntity.activation$getActivatedTick() == currentTick) { continue; } final Vector3i tilePos = VecHelper.toVector3i(tileEntity.getPos()); if (currentTick > ((ActivationCapability) tileEntity).activation$getActivatedTick()) { if (spongeTileEntity.activation$getDefaultActivationState()) { ((ActivationCapability) tileEntity).activation$setActivatedTick(currentTick); continue; } if (spongeTileEntity.activation$requiresActivationCacheRefresh()) { TileEntityActivation.initializeTileEntityActivationState(tileEntity); spongeTileEntity.activation$requiresActivationCacheRefresh(false); } final int activationRange = ((ActivationCapability) tileEntity).activation$getActivationRange(); final int bbActivationRange = activationRange * activationRange; for (EntityPlayerMP player : players) { final Vector3i playerPos = VecHelper.toVector3i(player.getPosition()); final int blockDistance = tilePos.distanceSquared(playerPos); if (blockDistance <= bbActivationRange) { ((ActivationCapability) tileEntity).activation$setActivatedTick(currentTick); break; } } } } }