when crafting a copy, make crafting player the owner of copy

This commit is contained in:
whosit 2023-05-12 16:32:34 +03:00
parent aa575ae02b
commit 3f30011448

View File

@ -427,6 +427,9 @@ local function waypoint_compass_copy_meta(itemstack, player, old_craft_grid, cra
end
local copymeta = original:get_meta():to_table()
itemstack:get_meta():from_table(copymeta)
set_compass_meta_owner(itemstack:get_meta(),
(player and player:get_player_name()) or
original:get_meta():get_string("waypoint_compass:owner"))
-- put the compass with metadata back in the craft grid
craft_inv:set_stack("craft", index, original)
end