From d1db66bf4fca57c3ae2d020ba7f575e432901535 Mon Sep 17 00:00:00 2001 From: paramat Date: Sun, 24 Dec 2017 02:23:29 +0000 Subject: [PATCH] Ferns: Add 3 sizes for coniferous forest biome Remove flowers from coniferous forest. Add 'dirt with coniferous litter' to farming mod overrides. --- mods/default/README.txt | 3 ++ mods/default/crafting.lua | 6 +++ mods/default/license.txt | 1 + mods/default/mapgen.lua | 26 +++++++++++ mods/default/nodes.lua | 56 +++++++++++++++++++++++ mods/default/textures/default_fern_1.png | Bin 0 -> 370 bytes mods/default/textures/default_fern_2.png | Bin 0 -> 691 bytes mods/default/textures/default_fern_3.png | Bin 0 -> 1172 bytes mods/farming/nodes.lua | 8 ++++ mods/flowers/mapgen.lua | 5 +- 10 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 mods/default/textures/default_fern_1.png create mode 100644 mods/default/textures/default_fern_2.png create mode 100644 mods/default/textures/default_fern_3.png diff --git a/mods/default/README.txt b/mods/default/README.txt index d27e8a87..f749b0e3 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -218,6 +218,9 @@ tobyplowy (CC BY-SA 3.0): CloudyProton (CC BY-SA 3.0): default_book_written.png, based on default_book.png by Gambit +Mossmanikin (CC BY-SA 3.0): + default_fern_*.png + Glass breaking sounds (CC BY 3.0): 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ 2: http://www.freesound.org/people/Tomlija/sounds/97669/ diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 2d11d26c..dd91ad42 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -1098,6 +1098,12 @@ minetest.register_craft({ burntime = 2, }) +minetest.register_craft({ + type = "fuel", + recipe = "default:fern_1", + burntime = 2, +}) + minetest.register_craft({ type = "fuel", recipe = "default:paper", diff --git a/mods/default/license.txt b/mods/default/license.txt index ce143ee5..4610bac8 100644 --- a/mods/default/license.txt +++ b/mods/default/license.txt @@ -48,6 +48,7 @@ Copyright (C) 2010-2017: tobyplowy CloudyProton TumeniNodes + Mossmanikin You are free to: Share — copy and redistribute the material in any medium or format. diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index e06d1285..a12fe580 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -1640,6 +1640,26 @@ local function register_dry_grass_decoration(offset, scale, length) }) end +local function register_fern_decoration(seed, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.2, + spread = {x = 100, y = 100, z = 100}, + seed = seed, + octaves = 3, + persist = 0.7 + }, + biomes = {"coniferous_forest"}, + y_min = 6, + y_max = 31000, + decoration = "default:fern_" .. length, + }) +end + function default.register_decorations() @@ -1960,6 +1980,12 @@ function default.register_decorations() register_dry_grass_decoration(0.07, -0.01, 2) register_dry_grass_decoration(0.09, -0.03, 1) + -- Ferns + + register_fern_decoration(14936, 3) + register_fern_decoration(801, 2) + register_fern_decoration(5, 1) + -- Junglegrass minetest.register_decoration({ diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 25222308..a366892d 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -143,6 +143,10 @@ default:dry_grass_3 default:dry_grass_4 default:dry_grass_5 +default:fern_1 +default:fern_2 +default:fern_3 + default:bush_stem default:bush_leaves default:bush_sapling @@ -1315,6 +1319,58 @@ for i = 2, 5 do end +minetest.register_node("default:fern_1", { + description = "Fern", + drawtype = "plantlike", + waving = 1, + tiles = {"default_fern_1.png"}, + inventory_image = "default_fern_1.png", + wield_image = "default_fern_1.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random fern node + local stack = ItemStack("default:fern_" .. math.random(1, 3)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:fern_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 3 do + minetest.register_node("default:fern_" .. i, { + description = "Fern", + drawtype = "plantlike", + waving = 1, + visual_scale = 2, + tiles = {"default_fern_" .. i .. ".png"}, + inventory_image = "default_fern_" .. i .. ".png", + wield_image = "default_fern_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, + not_in_creative_inventory=1}, + drop = "default:fern_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + }) +end + + minetest.register_node("default:bush_stem", { description = "Bush Stem", drawtype = "plantlike", diff --git a/mods/default/textures/default_fern_1.png b/mods/default/textures/default_fern_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b307986d43d26c9fabd118ab81a85475f7cf6771 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMffdHQnS0F8|#Al!{qH6Txu9rsuxyb5nf>uTVWPaWfoa&kyNFh zRI4A_WE5L(9oB4|(yW)Vre}9T756};cB|(0{3=Yq3qyaezo-U3d5|@(`B=#IQ za){3(ih1MGg@O?-SFcQSboB2%=;JKE%FX+vm!CsGkO$Kt(=fB^f)5`(5WBWDa3lLC z-ijM3KSWKhZauo>iDZhSmW$*O%gCiaZ&WJAa3rLqBsOhea9GFw@45^p6VNUOPgg&e IbxsLQ00R7XrvLx| literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_fern_2.png b/mods/default/textures/default_fern_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6c5f7d544af1d0485a97cbc478c16089ece8e622 GIT binary patch literal 691 zcmV;k0!;mhP)bPRc|d& zaWGDDHCJ&aM|C<>ax+qMGf{LhQ*<{|bum_TE>?6nRd_X1c`;RZHduKzU3fNLcr;jg zHdcHzS$jBQdM{LcJzIP^T75WKemhlwGh%%&Re~~Ie>+x#Gi84J%H+z^pdz(CNowpg?+~NqeMHcc)E-q(geCWqYkqg|AkRuTP6A)kXjS z00DGTPE!Ct=GbNc006^DL_t(I%VS^|1*2eyg81_6b}*x%7DSe$$HbzkXwu0|Enr}% z$#eH*V5m$q@kUqR?3NtS!oXk~8tK8{km4U3j%iC^zI|z+m9meTk*kJ2hHPtHV{uua zypyn~rGTDzNOW}ts(f%E literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_fern_3.png b/mods/default/textures/default_fern_3.png new file mode 100644 index 0000000000000000000000000000000000000000..2c1f605e79efb7f8426ed8200077c3beba757f17 GIT binary patch literal 1172 zcmV;F1Z(?=P)MiW9kBPB-{CP)@1NEIna z5;a5_D@YnQMH)RtBrZ%KHcKcsP9`o=A~RAKJWv}nQXe`{B{)$bF;*HnQz9}}CrnN& zGFKx^Pb@N6BtBInGg=%#Rwg-FAV60qJz66^S|&VQAV6FsLR=|AT_-(XCq-T&N?s&G zU?x9eCP!c-Kw}+6U@tvnCq-f@JZ3FMWF|poB|&BCJLNo+4jY%)%3FidPROKv4cZzoM|C`)fIPi`|uaV<}8FHdkV zP;f9+Z!J!7F;HJemGfvJ5_))Vtp@NemYfxGF^W=U4S}PgEMA-EMHD850YJ)OfhB;t`K3#@AR*5!ahBjz}PGN^UY=tvo zh&x}1Om2oWZHGH#iacG7H)D%CV~aj$iaT+LJ!FhMWsE>=j4^MEHg1eGa*H)*jY4IP zKyHmPYmGZ{j5KGCLu8LdXpcc^k3?vYKxmIlYLG%}kV9mVPjHV$X_7x@lRb8iI%$$d zXOu;1ls|BjJ!_OhXO=#3kz8?>7*I&Pjube>6co=Sh5L3N%?f1N;dphtt8LwBG;e4j&lpiF+D zLVTh?g`hxoq(^$ANqnPAd!$l$r%HFHO@*XGeWpu#sbzPrM1-kPd#zA@txAEeRe`Wl zg|AkHuvd1rP>-)q#r5?F00001bW%=J06^y0W&i*IT1iAfR5;6HU>F6XfHd&w`TN$b zaNb8aYyZ&;=OC=F%P#L(@d3hq`S>n`acawg+(l5On;D)toj$nk2#|TZ<4|Q2kiI@~ zRb(B*BDiVA^i)JG^!3NuGRt@5#oKXWK6t7byCvC&{^aYfiZ{|JK!O zQ2FlrOKpJc|boc&RszW=*qWnXUt-7un`bR zZ9X1o5v&!E&$%mz!3ZtD6B(RUtnA~LYed`e*7`CiVTlt@hA3s896f$jRt7E{(I(Ev mB*x9cCWR+v8QD3QQAGf}41PZ|#X6e+0000