From 6267f26027350f0b80d091044ddfc1177aa6fa47 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 4 Jan 2016 17:56:20 -0800 Subject: [PATCH] Aspen trees. Adds a birch-like tree to the default_game. Aspen was chosen on purpose instead of birch, as several birch tree mods already exist and choosing a different name avoids any conflicts. Schematics were made for both normal and sapling version, assuring saplings will not be able to grief. The shape of the Aspen is "fanning out at the top" and provides an easy tree to walk under, but still a somewhat thick cover. The Aspen trunk is 4 to 6 blocks tall, with up to three layers of leaves on top, making it slightly taller than an Apple tree, but shorter than a Pine tree, which provides a good blend. Textures were painted from scratch, except tree_top and _wood variants, which are color modified versions of the pine_wood variants. Appropriate licenses have been chosen for the new textures. The leaf texture is light enough to contrast other trees, but dark enough to offset against our light default grass color. The leaves are drawn in the typical minetest default fashion with plenty of transparancy, but enough definition to suggest that you're seeing something that looks like leaves. The placement of leaves in the schematic also suggests the top of the tree is sparse and you can see the sky through the leaves. Sapling texture is both traditional and different, with lush green leaves and a well-defined stem, but slightly stick-like and skinny, as these plants tend to grow up first, then out. Add fallen Aspen logs. We make these logs a minimum of 2 blocks long, and up to 3. This allows us to make these logs a place where both red and brown mushrooms can be found, to these may be attractive to players. However, the spawn rate for these has been reduced a lot compared to the other logs, to account for the scarcity of Aspen. Add stairs, slabs for these wood types as well. Mapgen will place these trees in deciduous forests only, but in a way that the biome is a range between entirely Apple trees, and mostly entirely Aspen trees, with a bias to Apple trees. To make fallen logs somewhat correlated with trees, we modify the planting of Apple trees and logs to use perlin noise and not fill ratio, otherwise you'd always end up with Apple logs in Aspen tree areas, which would be suspicious. There still is a bit of a mix. --- mods/default/README.txt | 5 ++ mods/default/crafting.lua | 7 ++ mods/default/mapgen.lua | 65 +++++++++++++++++- mods/default/nodes.lua | 63 +++++++++++++++++ mods/default/schematics/aspen_tree.mts | Bin 0 -> 177 bytes .../schematics/aspen_tree_from_sapling.mts | Bin 0 -> 171 bytes .../default/textures/default_aspen_leaves.png | Bin 0 -> 761 bytes .../textures/default_aspen_sapling.png | Bin 0 -> 320 bytes mods/default/textures/default_aspen_tree.png | Bin 0 -> 695 bytes .../textures/default_aspen_tree_top.png | Bin 0 -> 656 bytes mods/default/textures/default_aspen_wood.png | Bin 0 -> 373 bytes mods/default/trees.lua | 15 +++- mods/stairs/init.lua | 7 ++ 13 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 mods/default/schematics/aspen_tree.mts create mode 100644 mods/default/schematics/aspen_tree_from_sapling.mts create mode 100644 mods/default/textures/default_aspen_leaves.png create mode 100644 mods/default/textures/default_aspen_sapling.png create mode 100644 mods/default/textures/default_aspen_tree.png create mode 100644 mods/default/textures/default_aspen_tree_top.png create mode 100644 mods/default/textures/default_aspen_wood.png diff --git a/mods/default/README.txt b/mods/default/README.txt index 5b07a36c..c190cee0 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -150,6 +150,11 @@ BlockMen (CC BY-SA 3.0): sofar (CC BY-SA 3.0): default_book_written.png, based on default_book.png + default_aspen_sapling + default_aspen_leaves + default_aspen_tree + default_aspen_tree_top, derived from default_pine_tree_top (by paramat) + default_aspen_wood, derived from default_pine_wood (by paramat) Neuromancer (CC BY-SA 2.0): default_cobble.png, based on texture by Brane praefect diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index fa8df2d6..b470d0d4 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -28,6 +28,13 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:aspen_wood 4', + recipe = { + {'default:aspen_tree'}, + } +}) + minetest.register_craft({ output = 'default:stick 4', recipe = { diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index 0411bcaa..c92514cf 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -991,8 +991,15 @@ function default.register_decorations() minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_grass"}, - sidelen = 80, - fill_ratio = 0.0015, + sidelen = 16, + noise_params = { + offset = 0.002, + scale = 0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, biomes = {"deciduous_forest"}, y_min = 1, y_max = 31000, @@ -1154,6 +1161,60 @@ function default.register_decorations() rotation = "random", }) + -- Aspen tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.01, + scale = -0.02, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 31000, + schematic = minetest.get_modpath("default").."/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = -0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 31000, + schematic = { + size = { x = 3, y = 3, z = 1}, + data = { + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "default:aspen_tree", param2 = 12 }, + { name = "default:aspen_tree", param2 = 12 }, + { name = "default:aspen_tree", param2 = 12, prob = 127 }, + { name = "flowers:mushroom_red", prob = 63 }, + { name = "flowers:mushroom_brown", prob = 63 }, + { name = "air", prob = 0 }, + }, + }, + flags = "place_center_x", + rotation = "random", + }) -- Large cactus minetest.register_decoration({ diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index aecbd357..62d0ec93 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -78,6 +78,10 @@ default:acacia_wood default:acacia_leaves default:acacia_sapling +default:aspen_tree +default:aspen_wood +default:aspen_leaves +default:aspen_sapling Ores ---- (1. In stone 2. Block) @@ -686,6 +690,65 @@ minetest.register_node("default:acacia_sapling", { sounds = default.node_sound_leaves_defaults(), }) +minetest.register_node("default:aspen_tree", { + description = "Aspen Tree", + tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png", + "default_aspen_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:aspen_wood", { + description = "Aspen Wood Planks", + tiles = {"default_aspen_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:aspen_leaves", { + description = "Aspen Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_aspen_leaves.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:aspen_sapling"}, rarity = 20}, + {items = {"default:aspen_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +minetest.register_node("default:aspen_sapling", { + description = "Aspen Tree Sapling", + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"default_aspen_sapling.png"}, + inventory_image = "default_aspen_sapling.png", + wield_image = "default_aspen_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), +}) -- -- Ores -- diff --git a/mods/default/schematics/aspen_tree.mts b/mods/default/schematics/aspen_tree.mts new file mode 100644 index 0000000000000000000000000000000000000000..fe54f6777c8848ea3578c2f7fbf6d6904339fdf1 GIT binary patch literal 177 zcmeYb3HD`RVPIw8VqmSWkFN&;Ai==Qz?_&_#2}KAnwD6aQ(~1^T#%X8EBt6PWVj-=57U zb7l5*EDg@-YJRk2N8sNlAN%y*?daP6k9i(L=R^(;qi>$MZY`$M_0FnfIi zd+$CsEah7EK%~oQ@voB~`}E)K=-U3TS<^F6Ih4!v+slhS{MqYbKR-L2Khg53*JA5= NcRot%+;7!q2LKWxO56Yd literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_aspen_leaves.png b/mods/default/textures/default_aspen_leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..17a708d1783819a4acdd09e730a2c1a9698dd686 GIT binary patch literal 761 zcmV6QJkpf{zalHKgb?9R@-GslZHOI6V4>U?p|;dvebsJ(qyjavlqxpd~b z0GwQTPNUf2%Gw|Ym|2|EqF*3MGrnHGBLEISE*@L;9kMK9e&q!P_H3(A?7M zbTM9mm)<<00K@Ia7bdg-xW){(A3ynoW_eDv60-5h&+_WKlbTqUb`((!OJpj@?DErU zGoM~uCrLAWuYmD=zB+eXW|xm@GwNZJoJ#0Xt?Z>8HOaIZj~Vms)2i<*C(a?Q~&d?Yba>D;ZZW{Q9>;0#I9;)V|G$0>mym43y zqHI3&-9NoBY`pRpS$UrGT% ryHf5ta(4NMzWmlxdTjon@;~?!-@`}`k9r=l00000NkvXXu0mjfvp{<5 literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_aspen_sapling.png b/mods/default/textures/default_aspen_sapling.png new file mode 100644 index 0000000000000000000000000000000000000000..f8d9136a0b5c0397e3feb54f1abce3e44e75ec47 GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4(FKU}X1naSX9Iot$uh$t(Qk|8xZ* zgGAw)PhXXtzayQ5*pPOs&FM9vUqwQFRQ?(1cez>s0^ MboFyt=akR{08U_&&Hw-a literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_aspen_tree.png b/mods/default/textures/default_aspen_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..933b9cad5eee86718a3c916251725c6324ac5824 GIT binary patch literal 695 zcmV;o0!aOdP)Pr9mrKsMQmSp+JkJM%K~+^+>o|^sAXu$d2q9}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-g|?^T(R;6!Wl>7CZ5ygzjJ1kr+qMAE qG>x(L@$qpOhW+X3csvpjGyeza5{5fc{>$(H0000KP)a(Q6^WAQ`lC-7wi&FU}meApBRSr#+|tcUpRR zegexEy<{we#DTo8%EBFHq*>2NL?8gLX4|9#g0DFw5dr(9)K?<_nKgPi0sU#;)Yc9F zMT!GKkpiHvW*`Y)#BmH?@LqF6r1%U6GSseraZ`MKa%#8RLG%eA3UM##AOVnelV-*+ z17OZG%pM+bPTp5#z78P(khxv5#g^}=C{k=f0#J$OY+c3aYM}k z{PomC1A?zV-rpE6vqlc|n(iaz`R+U!Y-V0Xjcf>2c}O!!E2JRi&LC TFEZ)J00000NkvXXu0mjfULl|; literal 0 HcmV?d00001 diff --git a/mods/default/trees.lua b/mods/default/trees.lua index 51a7a2e6..48718e5d 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -28,7 +28,8 @@ end minetest.register_abm({ nodenames = {"default:sapling", "default:junglesapling", - "default:pine_sapling", "default:acacia_sapling"}, + "default:pine_sapling", "default:acacia_sapling", + "default:aspen_sapling"}, interval = 10, chance = 50, action = function(pos, node) @@ -65,6 +66,10 @@ minetest.register_abm({ minetest.log("action", "An acacia sapling grows into a tree at ".. minetest.pos_to_string(pos)) default.grow_new_acacia_tree(pos) + elseif node.name == "default:aspen_sapling" then + minetest.log("action", "An aspen sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_aspen_tree(pos) end end }) @@ -395,3 +400,11 @@ function default.grow_new_acacia_tree(pos) minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, path, random, nil, false) end + +-- New aspen tree + +function default.grow_new_aspen_tree(pos) + local path = minetest.get_modpath("default") .. "/schematics/aspen_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, 0, nil, false) +end diff --git a/mods/stairs/init.lua b/mods/stairs/init.lua index b3e09937..c3ce160e 100644 --- a/mods/stairs/init.lua +++ b/mods/stairs/init.lua @@ -287,6 +287,13 @@ stairs.register_stair_and_slab("acacia_wood", "default:acacia_wood", "Acacia Wood Slab", default.node_sound_wood_defaults()) +stairs.register_stair_and_slab("aspen_wood", "default:aspen_wood", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_aspen_wood.png"}, + "Aspen Wood Stair", + "Aspen Wood Slab", + default.node_sound_wood_defaults()) + stairs.register_stair_and_slab("stone", "default:stone", {cracky = 3}, {"default_stone.png"},