Collisions Not Working in Platformer

Hi everyone,

I am making a platformer game in java, and I'm having a bit of a problem with collisions. So, my collisions work fine, but I am trying to make it so that the game only updates the collisions with blocks that are 3 away from the player. The blocks that are three away from the start are working, but once I move it does not seem to be updating the correct blocks, even though it should be.