diff --git a/README.md b/README.md index 0ccaeb8..17ecc56 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: -- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base -options, onion soup added (thanks edcrypt), Added apple pie +- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base +options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna - 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates - 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items. - 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block. diff --git a/crops/cotton.lua b/crops/cotton.lua index 24dc7bb..c5baf5b 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -1,6 +1,27 @@ local S = farming.intllib +-- wild cotton as a source of cotton seed +minetest.register_node("farming:cotton_wild", { + description = S("Wild Cotton"), + drawtype = "plantlike", + waving = 1, + tiles = {"farming_cotton_wild.png"}, + inventory_image = "farming_cotton_wild.png", + wield_image = "farming_cotton_wild.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, attached_node = 1, flammable = 4}, + drop = "farming:seed_cotton", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16}, + }, +}) + -- cotton seeds minetest.register_node("farming:seed_cotton", { description = S("Cotton Seed"), diff --git a/mapgen.lua b/mapgen.lua index 6ebbff5..2df5fe5 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -47,7 +47,7 @@ register_plant("onion_5", 5, 22, nil, "", -1, farming.onion) register_plant("garlic_5", 3, 30, nil, "group:tree", 1, farming.garlic) register_plant("pea_5", 25, 50, nil, "", -1, farming.peas) register_plant("beetroot_5", 1, 15, nil, "", -1, farming.beetroot) -register_plant("mint_4", 1, 75, {"default:dirt_with_grass", +register_plant("mint_4", 1, 75, {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, "group:water", 1, farming.mint) @@ -147,3 +147,22 @@ minetest.register_decoration({ decoration = {"farming:pineapple_8"}, }) end + +minetest.register_decoration({ + name = "farming:cotton_wild", + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = 0.1, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "farming:cotton_wild", +}) diff --git a/textures/farming_cotton_wild.png b/textures/farming_cotton_wild.png new file mode 100644 index 0000000..0107ad4 Binary files /dev/null and b/textures/farming_cotton_wild.png differ