I believe Solar meant the second easier solution with just a special block and addBlock command with terrain attribute.