abm also set plant on grass area

master
ademant 2019-01-09 11:50:02 +01:00
parent e435b3226e
commit 45c8184ebe
2 changed files with 4 additions and 2 deletions

View File

@ -98,7 +98,9 @@ minetest.register_abm({
local ptabove={x=pos.x,y=pos.y+1,z=pos.z}
local above = minetest.get_node(ptabove)
if above.name ~= "air" then
return
if (minetest.get_item_group(above.name, "grass")==0) or (minetest.get_item_group(above.name, "dry_grass")==0) then
return
end
end
local ptlight=minetest.get_node_light(ptabove)
if ptlight < farming.min_light then

View File

@ -3,7 +3,7 @@ farming.viscosity (Viscosity of walking through grain) int 1 1 10
farming.wait_min (Minimum waiting time for next growing step) int 60 5 500
farming.wait_max (Maximum waiting time for next growing step) int 70 6 510
farming.wilt_removal_time (Mean time to remove wilt crops) int 120 5 500
farming.wilt_time (Mean time for fullgrown crop to wilt) int 1200 5 5000
farming.wilt_time (Mean time for fullgrown crop to wilt) int 6400 5 5000
farming.min_light (Min light needed for crops to grow) int 10 1 14
farming.health_threshold (healthiness threshold) int 50 1 100
farming.factor_regrow (factor for regrow after punching) float 2