Added the setBlock() method.