     droppedPile = new ItemPile(blockName, 1) # TODO: custom drops
 
     excess = playerInventory.give droppedPile
-    console.log ''+playerInventory,excess
 
     content = []
-    for slot in playerInventory.array
+    for slot, i in playerInventory.array
       if slot?
         # TODO: configurable item textures (for now only uses block top)
         blockTextures = registry.getBlockProps(slot.item).texture
         itemTexture = if typeof blockTextures == 'string' then blockTextures else blockTextures[0]
 
-        content.push {icon: game.materials.texturePath + itemTexture + '.png', label:''+slot.count, id:slot.item}
+        content.push {icon: game.materials.texturePath + itemTexture + '.png', label:''+slot.count, id:i}
       else
         content.push {}
 
-    toolbar.setContent content
+    toolbar.updateContent content
 
     if excess > 0
       # if didn't fit in inventory, un-mine the block since they can't carry it
       # TODO: handle partial fits, prevent dupes (canFit before giving?) -- needed once have custom drops
       game.setBlock target.voxel, target.value
+      # TOOD: some kind of notification
 
 
   gui = new datgui.GUI()

      # 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
    }


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