We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4eb614 commit 5755c9aCopy full SHA for 5755c9a
builtin/game/item.lua
@@ -27,19 +27,11 @@ function core.get_pointed_thing_position(pointed_thing, above)
27
if above then
28
-- The position where a node would be placed
29
return pointed_thing.above
30
- else
31
- -- The position where a node would be dug
32
- return pointed_thing.under
33
end
+ -- The position where a node would be dug
+ return pointed_thing.under
34
elseif pointed_thing.type == "object" then
35
- obj = pointed_thing.ref
36
- if obj ~= nil then
37
- return obj:getpos()
38
39
- return nil
40
- end
41
42
+ return pointed_thing.ref and pointed_thing.ref:getpos()
43
44
45
0 commit comments