diff --git a/crops/artichoke.lua b/crops/artichoke.lua index 6a986aa..cbfef90 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -82,6 +82,7 @@ farming.registered_plants["farming:artichoke"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -96,7 +97,8 @@ minetest.register_decoration({ }, y_min = 1, y_max = 13, - decoration = {"farming:artichoke_5"}, + decoration = "farming:artichoke_5", spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/asparagus.lua b/crops/asparagus.lua index 5cd4d02..ca2d89d 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -89,6 +89,7 @@ farming.registered_plants["farming:asparagus"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ name = "farming:asparagus_5", deco_type = "simple", @@ -107,3 +108,4 @@ minetest.register_decoration({ decoration = "farming:asparagus_5", param2 = 3 }) +end diff --git a/crops/beans.lua b/crops/beans.lua index 22ca1bd..6954b02 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -235,6 +235,7 @@ 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"}, @@ -251,3 +252,4 @@ minetest.register_decoration({ y_max = 38, decoration = "farming:beanbush" }) +end diff --git a/crops/beetroot.lua b/crops/beetroot.lua index 149b978..9c2d88c 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -85,6 +85,7 @@ farming.registered_plants["farming:beetroot"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -101,3 +102,4 @@ minetest.register_decoration({ y_max = 20, decoration = "farming:beetroot_5" }) +end diff --git a/crops/blackberry.lua b/crops/blackberry.lua index 2d308ac..5de92ea 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -80,6 +80,7 @@ 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"}, @@ -96,3 +97,4 @@ minetest.register_decoration({ y_max = 20, decoration = "farming:blackberry_4" }) +end diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 85bbeeb..e5d6266 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -79,6 +79,7 @@ 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"}, @@ -95,3 +96,4 @@ minetest.register_decoration({ y_max = 15, decoration = "farming:blueberry_4" }) +end diff --git a/crops/cabbage.lua b/crops/cabbage.lua index c72c43f..1d3cb38 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -87,6 +87,7 @@ 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"}, @@ -103,3 +104,4 @@ minetest.register_decoration({ y_max = 15, decoration = "farming:cabbage_6" }) +end diff --git a/crops/carrot.lua b/crops/carrot.lua index 26f69c9..b07fe39 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -115,6 +115,7 @@ def = { 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"}, @@ -133,3 +134,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/chili.lua b/crops/chili.lua index 00ae994..8ec7c4f 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -98,6 +98,7 @@ farming.registered_plants["farming:chili_pepper"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { @@ -115,7 +116,8 @@ minetest.register_decoration({ }, y_min = 5, y_max = 35, - decoration = {"farming:chili_8"}, + decoration = "farming:chili_8", spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/coffee.lua b/crops/coffee.lua index e1f254b..d45c97f 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -89,6 +89,7 @@ def = { "mcl_core:dirt_with_grass"} } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.spawn_on, @@ -105,3 +106,4 @@ minetest.register_decoration({ y_max = def.y_max, decoration = "farming:coffee_5" }) +end diff --git a/crops/corn.lua b/crops/corn.lua index b56d9c8..8ee6936 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -111,6 +111,7 @@ 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"}, @@ -127,3 +128,4 @@ minetest.register_decoration({ y_max = 25, decoration = "farming:corn_7" }) +end diff --git a/crops/cotton.lua b/crops/cotton.lua index bc1d142..fe51ddd 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -180,6 +180,7 @@ def = { biome = mg and {"jungle"} or {"savanna"} } +if not farming.eth then minetest.register_decoration({ name = "farming:cotton_wild", deco_type = "simple", @@ -198,7 +199,7 @@ minetest.register_decoration({ y_min = 1, decoration = "farming:cotton_wild" }) - +end --[[ Cotton using api farming.register_plant("farming:cotton", { diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 66d3867..884c410 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -87,6 +87,7 @@ def = { 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"}, @@ -105,3 +106,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/eggplant.lua b/crops/eggplant.lua index 941e6ee..b852a31 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -84,6 +84,7 @@ 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"}, @@ -102,3 +103,4 @@ minetest.register_decoration({ decoration = "farming:eggplant_4", param2 = 3 }) +end diff --git a/crops/garlic.lua b/crops/garlic.lua index 51cd03c..6d2c23a 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -82,6 +82,7 @@ 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"}, @@ -100,3 +101,4 @@ minetest.register_decoration({ spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/ginger.lua b/crops/ginger.lua index 103f1e0..d6e6fca 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -83,6 +83,7 @@ farming.registered_plants["farming:ginger"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ name = "farming:ginger_4", deco_type = "simple", @@ -101,3 +102,4 @@ minetest.register_decoration({ decoration = "farming:ginger_3", param2 = 3 }) +end diff --git a/crops/grapes.lua b/crops/grapes.lua index 6e0fd6d..5aba1d4 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -248,6 +248,7 @@ 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"}, @@ -264,3 +265,4 @@ minetest.register_decoration({ y_max = 50, decoration = "farming:grapebush" }) +end diff --git a/crops/hemp.lua b/crops/hemp.lua index 4bb595b..42f5b65 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -136,6 +136,7 @@ farming.registered_plants["farming:hemp"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { @@ -157,3 +158,4 @@ minetest.register_decoration({ spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/lettuce.lua b/crops/lettuce.lua index a950d0f..986d5a4 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -81,6 +81,7 @@ 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"}, @@ -97,3 +98,4 @@ minetest.register_decoration({ y_max = 35, decoration = "farming:lettuce_5" }) +end diff --git a/crops/melon.lua b/crops/melon.lua index b123eb0..87f04f3 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -115,6 +115,7 @@ def = { num = mg and 1 or -1, } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.spawn_on, @@ -133,3 +134,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/mint.lua b/crops/mint.lua index 9894e7e..8d9a66c 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -101,6 +101,7 @@ farming.registered_plants["farming:mint"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { @@ -122,3 +123,4 @@ minetest.register_decoration({ spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) +end diff --git a/crops/onion.lua b/crops/onion.lua index 1c56b4f..8b445d0 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -94,6 +94,7 @@ 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"}, @@ -110,3 +111,4 @@ minetest.register_decoration({ y_max = 28, decoration = "farming:onion_5" }) +end diff --git a/crops/parsley.lua b/crops/parsley.lua index 4be7ab9..167377b 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -73,6 +73,7 @@ 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"}, @@ -89,3 +90,4 @@ minetest.register_decoration({ y_max = 40, decoration = "farming:parsley_3" }) +end diff --git a/crops/peas.lua b/crops/peas.lua index 467d08e..f569abe 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -92,6 +92,7 @@ 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"}, @@ -108,3 +109,4 @@ minetest.register_decoration({ y_max = 55, decoration = "farming:pea_5" }) +end diff --git a/crops/pepper.lua b/crops/pepper.lua index 2147929..41a3d61 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -159,6 +159,7 @@ def = { "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, @@ -177,3 +178,4 @@ minetest.register_decoration({ spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 3f18eed..2b61f02 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -126,6 +126,7 @@ def = { num = mg and 1 or -1 } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.grow_on, @@ -140,7 +141,8 @@ minetest.register_decoration({ }, y_min = 11, y_max = 30, - decoration = {"farming:pineapple_8"}, + decoration = "farming:pineapple_8", spawn_by = def.grow_near, num_spawn_by = def.num }) +end diff --git a/crops/potato.lua b/crops/potato.lua index 1f76493..2429bc8 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -100,6 +100,7 @@ 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"}, @@ -116,3 +117,4 @@ minetest.register_decoration({ y_max = 40, decoration = "farming:potato_3" }) +end diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index de3fe08..6f9f78f 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -116,6 +116,7 @@ def = { 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"}, @@ -134,3 +135,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 210225d..268512e 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -80,6 +80,7 @@ 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"}, @@ -96,3 +97,4 @@ minetest.register_decoration({ y_max = 15, decoration = "farming:raspberry_4" }) +end diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index 15ff9df..ae357d8 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -85,6 +85,7 @@ 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"}, @@ -101,3 +102,4 @@ minetest.register_decoration({ y_max = 20, decoration = "farming:rhubarb_3" }) +end diff --git a/crops/soy.lua b/crops/soy.lua index 78e9390..2745481 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -118,6 +118,7 @@ def = { "mcl_core:dirt_with_grass"} } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.spawn_on, @@ -134,3 +135,4 @@ minetest.register_decoration({ y_max = 50, decoration = "farming:soy_6" }) +end diff --git a/crops/spinach.lua b/crops/spinach.lua index e84f976..a6a3373 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -84,6 +84,7 @@ 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"}, @@ -102,3 +103,4 @@ minetest.register_decoration({ decoration = "farming:spinach_4", param2 = 3 }) +end diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 9d49485..572964a 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -112,6 +112,7 @@ 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"}, @@ -128,3 +129,4 @@ minetest.register_decoration({ y_max = 55, decoration = "ethereal:strawberry_7" }) +end diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 9738d5e..0f218e8 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -130,6 +130,7 @@ 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"}, @@ -146,3 +147,4 @@ minetest.register_decoration({ y_max = 40, decoration = "farming:sunflower_8" }) +end diff --git a/crops/tomato.lua b/crops/tomato.lua index b97246c..23b4457 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -109,6 +109,7 @@ 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"}, @@ -125,3 +126,4 @@ minetest.register_decoration({ y_max = 25, decoration = "farming:tomato_7" }) +end diff --git a/crops/vanilla.lua b/crops/vanilla.lua index 307cd46..bc11b9d 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -107,6 +107,7 @@ 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"}, @@ -123,3 +124,4 @@ minetest.register_decoration({ y_max = 35, decoration = "farming:vanilla_7" }) +end diff --git a/init.lua b/init.lua index a562edc..100ec51 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ local S = minetest.get_translator("farming") farming = { mod = "redo", - version = "20240912", + version = "20240919", 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}}, @@ -21,6 +21,7 @@ farming = { mapgen = minetest.get_mapgen_setting("mg_name"), use_utensils = minetest.settings:get_bool("farming_use_utensils") ~= false, mtg = minetest.get_modpath("default"), + eth = minetest.get_modpath("ethereal"), mcl = minetest.get_modpath("mcl_core"), mcl_hardness = 0.01, translate = S