mirror of
https://github.com/minetest-mods/more_chests.git
synced 2025-07-07 17:40:23 +02:00
Use get_definition() method instead of minetest.registered_items
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user