mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
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.
This commit is contained in:
parent
535e611eb1
commit
6267f26027
@ -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
|
||||
|
@ -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 = {
|
||||
|
@ -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({
|
||||
|
@ -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
|
||||
--
|
||||
|
BIN
mods/default/schematics/aspen_tree.mts
Normal file
BIN
mods/default/schematics/aspen_tree.mts
Normal file
Binary file not shown.
BIN
mods/default/schematics/aspen_tree_from_sapling.mts
Normal file
BIN
mods/default/schematics/aspen_tree_from_sapling.mts
Normal file
Binary file not shown.
BIN
mods/default/textures/default_aspen_leaves.png
Normal file
BIN
mods/default/textures/default_aspen_leaves.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 761 B |
BIN
mods/default/textures/default_aspen_sapling.png
Normal file
BIN
mods/default/textures/default_aspen_sapling.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 320 B |
BIN
mods/default/textures/default_aspen_tree.png
Normal file
BIN
mods/default/textures/default_aspen_tree.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 695 B |
BIN
mods/default/textures/default_aspen_tree_top.png
Normal file
BIN
mods/default/textures/default_aspen_tree_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 656 B |
BIN
mods/default/textures/default_aspen_wood.png
Normal file
BIN
mods/default/textures/default_aspen_wood.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 373 B |
@ -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
|
||||
|
@ -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"},
|
||||
|
Loading…
Reference in New Issue
Block a user