Fix crash in grass expansion code

This commit is contained in:
Wuzzy 2019-09-22 12:30:39 +02:00
parent 7cc00605cb
commit b0051842b4
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ minetest.register_abm( -- dirt with grass becomes dirt if covered
local name = minetest.get_node(above).name
local partialblock = minetest.get_item_group(name, "path") ~= 0 or minetest.get_item_group(name, "slab") ~= 0 or minetest.get_item_group(name, "stair") ~= 0
local nodedef = minetest.registered_nodes[name]
if name ~= "ignore" and nodedef and (partialblock) or (not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none")) then
if nodedef and (name ~= "ignore" and (partialblock) or (not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none"))) then
if node.name == "default:dirt_with_swamp_grass" then
minetest.set_node(pos, {name = "default:swamp_dirt"})
else