Skip to content
Snippets Groups Projects
Commit 2bf9abad authored by Nathanaëlle Courant's avatar Nathanaëlle Courant
Browse files

Fix grass adding/removing ABM.

parent 69a59f1e
No related branches found
No related tags found
No related merge requests found
...@@ -1618,7 +1618,7 @@ minetest.register_abm({ ...@@ -1618,7 +1618,7 @@ minetest.register_abm({
local above = {x=pos.x, y=pos.y+1, z=pos.z} local above = {x=pos.x, y=pos.y+1, z=pos.z}
local name = minetest.get_node(above).name local name = minetest.get_node(above).name
local nodedef = minetest.registered_nodes[name] local nodedef = minetest.registered_nodes[name]
if nodedef and nodedef.sunlight_propagates and nodedef.liquidtype == "none" and minetest.get_node_light(above) >= 13 then if nodedef and (nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none" and minetest.get_node_light(above) >= 13 then
if name == "default:snow" or name == "default:snowblock" then if name == "default:snow" or name == "default:snowblock" then
minetest.set_node(pos, {name = "default:dirt_with_snow"}) minetest.set_node(pos, {name = "default:dirt_with_snow"})
else else
...@@ -1636,7 +1636,7 @@ minetest.register_abm({ ...@@ -1636,7 +1636,7 @@ minetest.register_abm({
local above = {x=pos.x, y=pos.y+1, z=pos.z} local above = {x=pos.x, y=pos.y+1, z=pos.z}
local name = minetest.get_node(above).name local name = minetest.get_node(above).name
local nodedef = minetest.registered_nodes[name] local nodedef = minetest.registered_nodes[name]
if name ~= "ignore" and nodedef and not (nodedef.sunlight_propagates and nodedef.liquidtype == "none") then if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none") then
minetest.set_node(pos, {name = "default:dirt"}) minetest.set_node(pos, {name = "default:dirt"})
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment