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
|
@ -1409,6 +1409,9 @@ minetest.register_node("mcl_core:ladder", {
|
|||
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
|
||||
local groups = def.groups
|
||||
|
||||
-- Don't allow to place the ladder at particular nodes
|
||||
|
@ -1483,6 +1486,7 @@ minetest.register_node("mcl_core:vine", {
|
|||
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
|
||||
local groups = def.groups
|
||||
|
||||
-- Check special rightclick action of pointed node
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue