What I'm trying to do is look for all of the blocks in a vertical line, if the block is the same as the given block, draw a circle. When the circleMaterial and circleCenterMaterial objects are null, use the material stored in the HashMap to reset back to the materials there were before. Code: click here. Here is the output. This is what I'm using to test with, what happens is that only the block I selected changes to the surroundBlock material. There is a lapis block in the middle of every floor. What happens is that it changes the first time but when it has to reset those circles, it only resets the center of every circle.