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
|
@ -252,6 +252,9 @@ function mcl_util.generate_on_place_plant_function(condition)
|
|||
local place_pos
|
||||
local def_under = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
|
||||
local def_above = minetest.registered_nodes[minetest.get_node(pointed_thing.above).name]
|
||||
if not def_under or not def_above then
|
||||
return itemstack
|
||||
end
|
||||
if def_under.buildable_to then
|
||||
place_pos = pointed_thing.under
|
||||
elseif def_above.buildable_to then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue