diff --git a/crops/artichoke.lua b/crops/artichoke.lua index cbfef90..bec1e49 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -82,10 +82,15 @@ farming.registered_plants["farming:artichoke"] = { -- mapgen -if not farming.eth then +local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"} + +if farming.eth then + spawn_on = {"ethereal:grove_dirt"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -95,10 +100,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 13, + y_min = 1, y_max = 13, decoration = "farming:artichoke_5", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/asparagus.lua b/crops/asparagus.lua index ca2d89d..c881440 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -89,7 +89,6 @@ farming.registered_plants["farming:asparagus"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ name = "farming:asparagus_5", deco_type = "simple", @@ -103,9 +102,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 8, - y_max = 32, + y_min = 8, y_max = 32, decoration = "farming:asparagus_5", param2 = 3 }) -end diff --git a/crops/beans.lua b/crops/beans.lua index 6954b02..0ebba69 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -235,7 +235,6 @@ minetest.register_node("farming:beanbush", { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -248,8 +247,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 18, - y_max = 38, + y_min = 18, y_max = 38, decoration = "farming:beanbush" }) -end diff --git a/crops/beetroot.lua b/crops/beetroot.lua index 9c2d88c..179e796 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -85,10 +85,15 @@ farming.registered_plants["farming:beetroot"] = { -- mapgen -if not farming.eth then +local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"} + +if farming.eth then + spawn_on = {"ethereal:prairie_dirt"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -98,8 +103,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 20, + y_min = 1, y_max = 20, decoration = "farming:beetroot_5" }) -end diff --git a/crops/blackberry.lua b/crops/blackberry.lua index 5de92ea..d21c3ba 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -80,10 +80,11 @@ farming.registered_plants["farming:blackberry"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -93,8 +94,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 20, + y_min = 3, y_max = 20, decoration = "farming:blackberry_4" }) -end diff --git a/crops/blueberry.lua b/crops/blueberry.lua index e5d6266..f4f3b3a 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -79,10 +79,11 @@ farming.registered_plants["farming:blueberries"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -92,8 +93,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 15, + y_min = 3, y_max = 15, decoration = "farming:blueberry_4" }) -end diff --git a/crops/cabbage.lua b/crops/cabbage.lua index 1d3cb38..b42eda7 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -87,7 +87,6 @@ farming.registered_plants["farming:cabbage"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -100,8 +99,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 2, - y_max = 15, + y_min = 2, y_max = 15, decoration = "farming:cabbage_6" }) -end diff --git a/crops/carrot.lua b/crops/carrot.lua index b07fe39..41911a2 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -107,18 +107,11 @@ farming.registered_plants["farming:carrot"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 30 or 20, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -128,10 +121,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, - decoration = "farming:carrot_8", - spawn_by = def.near, - num_spawn_by = def.num + y_min = 1, y_max = 30, + decoration = "farming:carrot_7" }) -end diff --git a/crops/chili.lua b/crops/chili.lua index 8ec7c4f..98ad043 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -98,12 +98,11 @@ farming.registered_plants["farming:chili_pepper"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_rainforest_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" }, sidelen = 16, noise_params = { @@ -114,10 +113,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 45, decoration = "farming:chili_8", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/coffee.lua b/crops/coffee.lua index d45c97f..6b9f024 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -80,19 +80,19 @@ farming.registered_plants["farming:coffee"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 50 or 55, - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"} +local spawn_on = { + "default:dirt_with_dry_grass", "default:dirt_with_rainforest_litter", + "default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass", + "ethereal:prairie_dirt" } -if not farming.eth then +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -102,8 +102,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = def.y_max, + y_min = 20, y_max = 55, decoration = "farming:coffee_5" }) -end diff --git a/crops/corn.lua b/crops/corn.lua index 8ee6936..7dcbbb2 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -111,10 +111,11 @@ farming.registered_plants["farming:corn"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -124,8 +125,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 12, - y_max = 25, + y_min = 12, y_max = 27, decoration = "farming:corn_7" }) -end diff --git a/crops/cotton.lua b/crops/cotton.lua index fe51ddd..1dc2ae4 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -172,34 +172,31 @@ minetest.register_node("farming:cotton_wild", { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or {"default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"}, - biome = mg and {"jungle"} or {"savanna"} +local spawn_on = { + "default:dry_dirt_with_dry_grass", "default:dirt_with_dry_grass", + "mcl_core:dirt_with_grass" } -if not farming.eth then +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ name = "farming:cotton_wild", deco_type = "simple", - place_on = def.grow_on, + place_on = spawn_on, sidelen = 16, noise_params = { - offset = -0.1, - scale = 0.1, - spread = {x = 50, y = 50, z = 50}, + offset = 0, + scale = farming.cotton, + spread = {x = 100, y = 100, z = 100}, seed = 4242, octaves = 3, - persist = 0.7 + persist = 0.6 }, - biomes = def.biome, - y_max = 31000, - y_min = 1, + y_min = 1, y_max = 120, decoration = "farming:cotton_wild" }) -end --[[ Cotton using api farming.register_plant("farming:cotton", { diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 884c410..871eb43 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -80,17 +80,11 @@ farming.registered_plants["farming:cucumber"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -100,10 +94,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 20, + y_min = 1, y_max = 20, decoration = "farming:cucumber_4", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) -end diff --git a/crops/eggplant.lua b/crops/eggplant.lua index b852a31..0dd26bb 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -84,7 +84,6 @@ farming.registered_plants["farming:eggplant"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -97,10 +96,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - biomes = {"deciduous_forest"}, - y_max = 31000, - y_min = 1, - decoration = "farming:eggplant_4", + y_min = 1, y_max = 40, + decoration = "farming:eggplant_3", param2 = 3 }) -end diff --git a/crops/garlic.lua b/crops/garlic.lua index 6d2c23a..350e1f0 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -82,10 +82,12 @@ farming.registered_plants["farming:garlic"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt", + "default:dirt_with_rainforest_litter" + }, sidelen = 16, noise_params = { offset = 0, @@ -95,10 +97,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 35, + y_min = 3, y_max = 45, decoration = "farming:garlic_5", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/ginger.lua b/crops/ginger.lua index d6e6fca..7bc6ff5 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -83,11 +83,13 @@ farming.registered_plants["farming:ginger"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ name = "farming:ginger_4", deco_type = "simple", - place_on = {"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass", + "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -97,9 +99,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_max = 80, - y_min = 1, + y_min = 1, y_max = 80, decoration = "farming:ginger_3", param2 = 3 }) -end diff --git a/crops/grapes.lua b/crops/grapes.lua index 5aba1d4..55104d7 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -248,10 +248,11 @@ minetest.register_node("farming:grapebush", { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -261,8 +262,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 25, - y_max = 50, + y_min = 25, y_max = 50, decoration = "farming:grapebush" }) -end diff --git a/crops/hemp.lua b/crops/hemp.lua index 42f5b65..f36ef14 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -136,12 +136,11 @@ farming.registered_plants["farming:hemp"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_rainforest_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" }, sidelen = 16, noise_params = { @@ -152,10 +151,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 45, + y_min = 3, y_max = 45, decoration = "farming:hemp_7", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/lettuce.lua b/crops/lettuce.lua index 986d5a4..43c6e6d 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -81,10 +81,11 @@ farming.registered_plants["farming:lettuce"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -94,8 +95,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = "farming:lettuce_5" }) -end diff --git a/crops/melon.lua b/crops/melon.lua index 87f04f3..89d02a9 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -105,20 +105,12 @@ farming.registered_plants["farming:melon"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 20 or 6, - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass" + }, sidelen = 16, noise_params = { offset = 0, @@ -128,10 +120,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, + y_min = 1, y_max = 6, decoration = "farming:melon_8", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group_sand"}, num_spawn_by = 1 }) -end diff --git a/crops/mint.lua b/crops/mint.lua index 8d9a66c..00a99c0 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -101,12 +101,11 @@ farming.registered_plants["farming:mint"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_coniferous_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:bamboo_dirt" }, sidelen = 16, noise_params = { @@ -117,10 +116,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 0, - y_max = 75, + y_min = 1, y_max = 75, decoration = "farming:mint_4", - spawn_by = {"group:water", "group:sand"}, - num_spawn_by = 1 + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) -end diff --git a/crops/onion.lua b/crops/onion.lua index 8b445d0..e62eb44 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -94,10 +94,11 @@ farming.registered_plants["farming:onion"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -107,8 +108,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 28, + y_min = 5, y_max = 28, decoration = "farming:onion_5" }) -end diff --git a/crops/parsley.lua b/crops/parsley.lua index 167377b..b63b96a 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -73,10 +73,12 @@ farming.registered_plants["farming:parsley"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt", + "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -86,8 +88,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 10, - y_max = 40, + y_min = 10, y_max = 40, decoration = "farming:parsley_3" }) -end diff --git a/crops/peas.lua b/crops/peas.lua index f569abe..4dc1ec3 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -92,10 +92,11 @@ farming.registered_plants["farming:pea_pod"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -105,8 +106,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 25, - y_max = 55, + y_min = 25, y_max = 55, decoration = "farming:pea_5" }) -end diff --git a/crops/pepper.lua b/crops/pepper.lua index 41a3d61..df24ac8 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -152,17 +152,12 @@ farming.registered_plants["farming:pepper"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or { - "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"} -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = def.grow_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -172,10 +167,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"}, - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 2b61f02..f4076ff 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -117,19 +117,18 @@ farming.registered_plants["farming:pineapple"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass"}, - grow_near = mg and "group:sand" or nil, - num = mg and 1 or -1 +local spawn_on = { + "default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass", + "mcl_core:dirt_with_grass" } -if not farming.eth then +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = def.grow_on, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -139,10 +138,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 11, - y_max = 30, - decoration = "farming:pineapple_8", - spawn_by = def.grow_near, - num_spawn_by = def.num + y_min = 11, y_max = 30, + decoration = "farming:pineapple_8" }) -end diff --git a/crops/potato.lua b/crops/potato.lua index 2429bc8..f32ca93 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -100,10 +100,12 @@ farming.registered_plants["farming:potato"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -113,8 +115,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 15, - y_max = 40, + y_min = 5, y_max = 40, decoration = "farming:potato_3" }) -end diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 6f9f78f..1cad2ea 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -108,18 +108,12 @@ farming.registered_plants["farming:pumpkin"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 20 or 6, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass" + }, sidelen = 16, noise_params = { offset = 0, @@ -129,10 +123,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, + y_min = 1, y_max = 6, decoration = "farming:pumpkin_8", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) -end diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 268512e..6e04e6b 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -80,10 +80,11 @@ farming.registered_plants["farming:raspberries"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -93,8 +94,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 15, + y_min = 3, y_max = 15, decoration = "farming:raspberry_4" }) -end diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index ae357d8..afbffc1 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -85,10 +85,11 @@ farming.registered_plants["farming:rhubarb"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -98,8 +99,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 20, + y_min = 3, y_max = 20, decoration = "farming:rhubarb_3" }) -end diff --git a/crops/soy.lua b/crops/soy.lua index 2745481..194243c 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -110,18 +110,13 @@ farming.registered_plants["farming:soy_pod"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"} -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -131,8 +126,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = 50, - decoration = "farming:soy_6" + y_min = 20, y_max = 50, + decoration = "farming:soy_5" }) -end diff --git a/crops/spinach.lua b/crops/spinach.lua index a6a3373..5830300 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -84,7 +84,6 @@ farming.registered_plants["farming:spinach"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -97,10 +96,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - biomes = {"deciduous_forest"}, - y_max = 31000, - y_min = 1, + y_min = 1, y_max = 100, decoration = "farming:spinach_4", param2 = 3 }) -end diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 572964a..8c95ff5 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -112,10 +112,11 @@ farming.registered_plants["ethereal:strawberry"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -125,8 +126,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = 55, + y_min = 15, y_max = 55, decoration = "ethereal:strawberry_7" }) -end diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 0f218e8..55e0fdb 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -130,10 +130,11 @@ farming.registered_plants["farming:sunflower"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -143,8 +144,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 10, - y_max = 40, + y_min = 10, y_max = 40, decoration = "farming:sunflower_8" }) -end diff --git a/crops/tomato.lua b/crops/tomato.lua index 23b4457..a53b8bf 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -109,10 +109,11 @@ farming.registered_plants["farming:tomato"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -122,8 +123,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 25, + y_min = 5, y_max = 25, decoration = "farming:tomato_7" }) -end diff --git a/crops/vanilla.lua b/crops/vanilla.lua index bc11b9d..d07680c 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -107,10 +107,11 @@ farming.registered_plants["farming:vanilla"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -120,8 +121,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = "farming:vanilla_7" }) -end diff --git a/farming.conf_example b/farming.conf_example index 9840d7a..e075fe0 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -9,39 +9,40 @@ farming.asparagus = 0.002 farming.eggplant = 0.002 farming.spinach = 0.002 -farming.carrot = 0.001 -farming.potato = 0.001 -farming.tomato = 0.001 -farming.cucumber = 0.001 -farming.corn = 0.001 -farming.coffee = 0.001 -farming.melon = 0.001 -farming.pumpkin = 0.001 +farming.carrot = 0.002 +farming.potato = 0.002 +farming.tomato = 0.002 +farming.cucumber = 0.002 +farming.corn = 0.002 +farming.coffee = 0.002 +farming.melon = 0.009 +farming.pumpkin = 0.009 farming.cocoa = true -- true or false only -farming.raspberry = 0.001 -farming.blueberry = 0.001 -farming.rhubarb = 0.001 -farming.beans = 0.001 -farming.grapes = 0.001 +farming.raspberry = 0.002 +farming.blueberry = 0.002 +farming.rhubarb = 0.002 +farming.beans = 0.002 +farming.grapes = 0.002 farming.barley = true -- true or false only farming.chili = 0.003 farming.hemp = 0.003 -farming.garlic = 0.001 -farming.onion = 0.001 +farming.garlic = 0.002 +farming.onion = 0.002 farming.pepper = 0.002 -farming.pineapple = 0.001 -farming.peas = 0.001 -farming.beetroot = 0.001 +farming.pineapple = 0.003 +farming.peas = 0.002 +farming.beetroot = 0.002 farming.mint = 0.005 -farming.cabbage = 0.001 +farming.cabbage = 0.002 farming.blackberry = 0.002 -farming.lettuce = 0.001 -farming.soy = 0.001 -farming.vanilla = 0.001 -farming.artichoke = 0.001 +farming.lettuce = 0.002 +farming.soy = 0.002 +farming.vanilla = 0.002 +farming.artichoke = 0.002 farming.parsley = 0.002 -farming.sunflower = 0.001 +farming.sunflower = 0.002 farming.ginger = 0.002 +farming.cotton = 0.003 farming.strawberry = not minetest.get_modpath("ethereal") and 0.002 farming.grains = true -- true or false only farming.rice = true diff --git a/init.lua b/init.lua index 100ec51..8ff4fe4 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ local S = minetest.get_translator("farming") farming = { mod = "redo", - version = "20240919", + version = "20240924", path = minetest.get_modpath("farming"), select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}}, select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}}, @@ -656,40 +656,41 @@ end farming.asparagus = 0.002 farming.eggplant = 0.002 farming.spinach = 0.002 -farming.carrot = 0.001 -farming.potato = 0.001 -farming.tomato = 0.001 -farming.cucumber = 0.001 -farming.corn = 0.001 -farming.coffee = 0.001 -farming.melon = 0.001 -farming.pumpkin = 0.001 +farming.carrot = 0.002 +farming.potato = 0.002 +farming.tomato = 0.002 +farming.cucumber = 0.002 +farming.corn = 0.002 +farming.coffee = 0.002 +farming.melon = 0.009 +farming.pumpkin = 0.009 farming.cocoa = true -farming.raspberry = 0.001 -farming.blueberry = 0.001 -farming.rhubarb = 0.001 -farming.beans = 0.001 -farming.grapes = 0.001 +farming.raspberry = 0.002 +farming.blueberry = 0.002 +farming.rhubarb = 0.002 +farming.beans = 0.002 +farming.grapes = 0.002 farming.barley = true farming.chili = 0.003 farming.hemp = 0.003 -farming.garlic = 0.001 -farming.onion = 0.001 +farming.garlic = 0.002 +farming.onion = 0.002 farming.pepper = 0.002 -farming.pineapple = 0.001 -farming.peas = 0.001 -farming.beetroot = 0.001 +farming.pineapple = 0.003 +farming.peas = 0.002 +farming.beetroot = 0.002 farming.mint = 0.005 -farming.cabbage = 0.001 +farming.cabbage = 0.002 farming.blackberry = 0.002 -farming.soy = 0.001 -farming.vanilla = 0.001 -farming.lettuce = 0.001 -farming.artichoke = 0.001 +farming.soy = 0.002 +farming.vanilla = 0.002 +farming.lettuce = 0.002 +farming.artichoke = 0.002 farming.parsley = 0.002 -farming.sunflower = 0.001 +farming.sunflower = 0.002 farming.ginger = 0.002 farming.strawberry = 0.002 +farming.cotton = 0.003 farming.grains = true farming.rice = true