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 00000000..fe54f677 Binary files /dev/null and b/mods/default/schematics/aspen_tree.mts differ diff --git a/mods/default/schematics/aspen_tree_from_sapling.mts b/mods/default/schematics/aspen_tree_from_sapling.mts new file mode 100644 index 00000000..6bf0f186 Binary files /dev/null and b/mods/default/schematics/aspen_tree_from_sapling.mts differ diff --git a/mods/default/textures/default_aspen_leaves.png b/mods/default/textures/default_aspen_leaves.png new file mode 100644 index 00000000..17a708d1 Binary files /dev/null and b/mods/default/textures/default_aspen_leaves.png differ diff --git a/mods/default/textures/default_aspen_sapling.png b/mods/default/textures/default_aspen_sapling.png new file mode 100644 index 00000000..f8d9136a Binary files /dev/null and b/mods/default/textures/default_aspen_sapling.png differ diff --git a/mods/default/textures/default_aspen_tree.png b/mods/default/textures/default_aspen_tree.png new file mode 100644 index 00000000..933b9cad Binary files /dev/null and b/mods/default/textures/default_aspen_tree.png differ diff --git a/mods/default/textures/default_aspen_tree_top.png b/mods/default/textures/default_aspen_tree_top.png new file mode 100644 index 00000000..fcca0380 Binary files /dev/null and b/mods/default/textures/default_aspen_tree_top.png differ diff --git a/mods/default/textures/default_aspen_wood.png b/mods/default/textures/default_aspen_wood.png new file mode 100644 index 00000000..d16fdc97 Binary files /dev/null and b/mods/default/textures/default_aspen_wood.png differ 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"},