code: def create_block(mc, block_id, subtype=None):
      
      # Get player tile position and real position.
      ptx, pty, ptz = mc.player.getTilePos()
      px, py, pz = mc.player.getPos()
      # Create block at current player tile location.
      if subtype is None:
          mc.setBlock(ptx, pty, ptz, block_id)
      else:
          mc.setBlock(ptx, pty, ptz, block_id, subtype)
      # Move the player's real positon up one block.
      mc.player.setPos(px, py+1, pz)
docs: Build a block with the specified id and subtype under the player in the
      Minecraft world.  Subtype is optional and can be specified as None to use
      the default subtype for the block.