diff --git a/mods/ITEMS/mcl_farming/shared_functions.lua b/mods/ITEMS/mcl_farming/shared_functions.lua index a33e414ed..6ebf659ca 100644 --- a/mods/ITEMS/mcl_farming/shared_functions.lua +++ b/mods/ITEMS/mcl_farming/shared_functions.lua @@ -307,12 +307,11 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s or (dir == 3 and vector.offset(stempos, 0, 0, 1)) or vector.offset(stempos, 0, 0, -1) if minetest.get_node(neighbor).name ~= "air" then return end -- occupied - -- check for suitable floor: grass, dirt, or soil + -- check for suitable floor -- in contrast to MC, we think everything solid is fine local floorpos = vector.offset(neighbor, 0, -1, 0) local floorname = minetest.get_node(floorpos).name local floordef = minetest.registered_nodes[floorname] - if not floordef then return end - if (floordef.groups.grass_block or 0) == 0 and (floordef.groups.dirt or 0) == 0 and (floordef.groups.soil or 0) < 2 then return end -- not suitable for growing + if not floordef or not floordef.walkable then return end -- check moisture level local odds = floor(25 / (get_moisture_level(stempos) * get_same_crop_penalty(stempos))) + 1 diff --git a/mods/ITEMS/mcl_farming/soil.lua b/mods/ITEMS/mcl_farming/soil.lua index d943a7000..32f624c3c 100644 --- a/mods/ITEMS/mcl_farming/soil.lua +++ b/mods/ITEMS/mcl_farming/soil.lua @@ -72,6 +72,7 @@ minetest.register_abm({ node.name = "mcl_farming:soil_wet" minetest.set_node(pos, node) -- resets wetness meta:set_int("wet", 7) + meta:mark_as_private("wet") elseif wet < 7 then meta:set_int("wet", 7) end @@ -85,8 +86,11 @@ minetest.register_abm({ if node.name == "mcl_farming:soil_wet" then -- change visual appearance to dry node.name = "mcl_farming:soil" minetest.set_node(pos, node) + meta:set_int("wet", wet - 1) + meta:mark_as_private("wet") -- after set_int + else + meta:set_int("wet", wet - 1) end - meta:set_int("wet", wet - 1) return end -- Revert to dirt if wetness is 0, and no plant above