diff --git a/enchanting.lua b/enchanting.lua index d3ab87d..084be41 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -73,6 +73,10 @@ function enchanting.put(pos, listname, index, stack, player) return count end +function enchanting.move(pos, from_list, from_index, to_list, to_index, count, player) + return 0 +end + xdecor.register("enchantment_table", { description = "Enchantment Table", tiles = { @@ -85,7 +89,8 @@ xdecor.register("enchantment_table", { on_construct = enchanting.construct, can_dig = enchanting.dig, allow_metadata_inventory_put = enchanting.put, - on_receive_fields = enchanting.fields + on_receive_fields = enchanting.fields, + allow_metadata_inventory_move = enchanting.move }) function enchanting.register_enchtools(init, m, def) diff --git a/xwall.lua b/xwall.lua index c9734ef..25e6895 100644 --- a/xwall.lua +++ b/xwall.lua @@ -66,7 +66,7 @@ function xwall.update_one_node(pos, name, digged) local newnode = xwall.get_candidate[id] if newnode and newnode[1] then - local newname = string.sub(name, 1, string.len(name) -3)..newnode[1] + local newname = string.sub(name, 1, string.len(name)-3)..newnode[1] if newname and minetest.registered_nodes[newname] then minetest.swap_node(pos, {name=newname, param2=newnode[2]}) elseif newnode[1] == '_c0' and not minetest.registered_nodes[newname] then