Ench. Table : prevent moving stuff in slots to each other

This commit is contained in:
jp 2015-08-06 18:21:36 +02:00
parent ce22e630ee
commit 6a3a6e612d
2 changed files with 7 additions and 2 deletions

View File

@ -73,6 +73,10 @@ function enchanting.put(pos, listname, index, stack, player)
return count return count
end end
function enchanting.move(pos, from_list, from_index, to_list, to_index, count, player)
return 0
end
xdecor.register("enchantment_table", { xdecor.register("enchantment_table", {
description = "Enchantment Table", description = "Enchantment Table",
tiles = { tiles = {
@ -85,7 +89,8 @@ xdecor.register("enchantment_table", {
on_construct = enchanting.construct, on_construct = enchanting.construct,
can_dig = enchanting.dig, can_dig = enchanting.dig,
allow_metadata_inventory_put = enchanting.put, 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) function enchanting.register_enchtools(init, m, def)