diff --git a/models/wifi.lua b/models/wifi.lua index 40d5e6c..c720944 100644 --- a/models/wifi.lua +++ b/models/wifi.lua @@ -92,8 +92,7 @@ minetest.register_allow_player_inventory_action(function(player, action, invento if inventory_info.to_list == "more_chests:wifi" or inventory_info.from_list == "more_chests:wifi" then local pos = player:get_pos() local witem = player:get_wielded_item() - local iname = witem and witem:get_name() - local def = iname and minetest.registered_items[iname] + local def = witem and witem:get_definition() local range = def and def.range or (minetest.is_creative_enabled(player:get_player_name()) and 10 or 4) local chest = minetest.find_node_near(pos, range, "more_chests:wifi") if not chest then