minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
  if minetest.get_item_group(itemstack:get_name(), "sparktech_energy_storeonbreak") > 0 then
    local meta = minetest.get_meta(pos)
    if itemstack:get_metadata() and itemstack:get_metadata() ~= "" then
      meta:set_int("energy", itemstack:get_metadata())
    end	
  end
end)
