mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
parent
81d62d01d1
commit
1b5f13a5f3
2 changed files with 7 additions and 5 deletions
|
@ -739,16 +739,13 @@ core.noneitemdef_default = { -- This is used for the hand and unknown items
|
|||
-- get_node implementation
|
||||
--
|
||||
|
||||
local get_node_raw = core.get_node_raw
|
||||
core.get_node_raw = nil
|
||||
|
||||
function core.get_node(pos)
|
||||
local content, param1, param2 = get_node_raw(pos.x, pos.y, pos.z)
|
||||
local content, param1, param2 = core.get_node_raw(pos.x, pos.y, pos.z)
|
||||
return {name = core.get_name_from_content_id(content), param1 = param1, param2 = param2}
|
||||
end
|
||||
|
||||
function core.get_node_or_nil(pos)
|
||||
local content, param1, param2, pos_ok = get_node_raw(pos.x, pos.y, pos.z)
|
||||
local content, param1, param2, pos_ok = core.get_node_raw(pos.x, pos.y, pos.z)
|
||||
return pos_ok and
|
||||
{name = core.get_name_from_content_id(content), param1 = param1, param2 = param2}
|
||||
or nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue