This at least fixes the problem of the terrain stacking on itself over and over (the player can't go below Y = 0 nor above Y = 63 and the terrain won't render outside that range either). I also updated the selector to check for player/block collision based on the list instead of using sensing blocks. There's still a lot to fix it seems...