Skip to content

Commit 2bf9aba

Browse files
committedNov 2, 2013
Fix grass adding/removing ABM.
1 parent 69a59f1 commit 2bf9aba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎games/minimal/mods/default/init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ minetest.register_abm({
16181618
local above = {x=pos.x, y=pos.y+1, z=pos.z}
16191619
local name = minetest.get_node(above).name
16201620
local nodedef = minetest.registered_nodes[name]
1621-
if nodedef and nodedef.sunlight_propagates and nodedef.liquidtype == "none" and minetest.get_node_light(above) >= 13 then
1621+
if nodedef and (nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none" and minetest.get_node_light(above) >= 13 then
16221622
if name == "default:snow" or name == "default:snowblock" then
16231623
minetest.set_node(pos, {name = "default:dirt_with_snow"})
16241624
else
@@ -1636,7 +1636,7 @@ minetest.register_abm({
16361636
local above = {x=pos.x, y=pos.y+1, z=pos.z}
16371637
local name = minetest.get_node(above).name
16381638
local nodedef = minetest.registered_nodes[name]
1639-
if name ~= "ignore" and nodedef and not (nodedef.sunlight_propagates and nodedef.liquidtype == "none") then
1639+
if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none") then
16401640
minetest.set_node(pos, {name = "default:dirt"})
16411641
end
16421642
end

0 commit comments

Comments
 (0)
Please sign in to comment.