forked from mtcontrib/maidroid
Fix occasional crash with capture tool
This commit is contained in:
parent
ea7c3eb27b
commit
2f63c8aa42
@ -14,6 +14,7 @@ minetest.register_tool("maidroid_tool:capture_rod", {
|
|||||||
|
|
||||||
local obj = pointed_thing.ref
|
local obj = pointed_thing.ref
|
||||||
local luaentity = obj:get_luaentity()
|
local luaentity = obj:get_luaentity()
|
||||||
|
if not luaentity then return end
|
||||||
if not maidroid.is_maidroid(luaentity.name) then
|
if not maidroid.is_maidroid(luaentity.name) then
|
||||||
if luaentity.name == "__builtin:item" then
|
if luaentity.name == "__builtin:item" then
|
||||||
luaentity:on_punch(user)
|
luaentity:on_punch(user)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user