Revert "Remove getCubes patch as under some circumstances it can loop around itself forever. For anyone wishing to reimplement this patch, the rationale behind it is quite simple, get all cubes within each chunk at the same time."

This reverts commit 06233ce472ffb2474ee0935cbbf6609ab5ad706f.
Fix patches some more.
Redo previous getCubes removal.
Fix patch tree.