       # TODO: disable/re-enable voxel-walk in 1st/3rd person?
     else if ev.keyCode == 'T'.charCodeAt(0)
       game.plugins.toggle 'oculus'
-    else if '0'.charCodeAt(0) <= ev.keyCode <= '9'.charCodeAt(0)
-      slot = ev.keyCode - '0'.charCodeAt(0)
-      if slot == 0
-        slot = 10
-      console.log 'switching to slot #{slot}'
-
-      game.currentMaterial = slot
-
     else if ev.keyCode == 'O'.charCodeAt(0)
       home(avatar)
     else if ev.keyCode == 'C'.charCodeAt(0)

      jumpSpeed: 0.001
    }

  toolbar = createToolbar {el: '#tools'}
  toolbar.on 'select', (material) ->
    game.currentMaterial = +material


  console.log 'initializing plugins'
  plugins = createPlugins game, {require: require}

  ever(document.body).on 'contextmenu', (event) ->
    event.preventDefault()
    return false
  
  playerInventory = new Inventory(10)
  currentInventorySlot = 0
  toolbar = createToolbar {el: '#tools'}
  toolbar.on 'select', (slot) =>
    currentInventorySlot = slot

  reach.on 'interact', (target) =>
    if not target
      console.log 'waving'
      return

    currentItemPile = playerInventory.slot(currentInventorySlot)
    currentMaterial = currentItemPile.item
    currentBlockID = registry.getBlockID(currentMaterial)

    game.createBlock target.adjacent, currentBlockID
    #game.setBlock target.voxel, 0
    # TODO: other interactions depending on item (ex: click button, check target.sub; or other interactive blocks)

