For some reason, rand() isn't working, but pushing the left mouse now spawns cubes with proper randomness.