Fix many crashes when placing item on unknown node
This commit is contained in:
parent
27481afe06
commit
38cf151806
13 changed files with 41 additions and 12 deletions
|
@ -54,6 +54,7 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc
|
|||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if not def then return itemstack end
|
||||
|
||||
-- Call on_rightclick if the pointed node defines it
|
||||
if placer and not placer:get_player_control().sneak then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue