Optimized chunk loader

Fixes #1486 
use `FloorC` instead of `(int)std::floor`