1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-29 13:20:25 +02:00

Biomes: Add pine bush to taiga and snowy grassland

Replaces 'bush' in snowy grassland.
This commit is contained in:
TumeniNodes
2018-07-12 20:17:07 -04:00
committed by Paramat
parent d4b0b73ae0
commit 9318c71659
9 changed files with 142 additions and 2 deletions

View File

@ -162,6 +162,9 @@ default:bush_sapling
default:acacia_bush_stem
default:acacia_bush_leaves
default:acacia_bush_sapling
default:pine_bush_stem
default:pine_bush_needles
default:pine_bush_sapling
default:sand_with_kelp
@ -1681,6 +1684,77 @@ minetest.register_node("default:acacia_bush_sapling", {
end,
})
minetest.register_node("default:pine_bush_stem", {
description = "Pine Bush Stem",
drawtype = "plantlike",
visual_scale = 1.41,
tiles = {"default_pine_bush_stem.png"},
inventory_image = "default_pine_bush_stem.png",
wield_image = "default_pine_bush_stem.png",
paramtype = "light",
sunlight_propagates = true,
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
selection_box = {
type = "fixed",
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
},
})
minetest.register_node("default:pine_bush_needles", {
description = "Pine Bush Needles",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_pine_needles.png"},
paramtype = "light",
groups = {snappy = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"default:pine_bush_sapling"}, rarity = 5},
{items = {"default:pine_bush_needles"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.register_node("default:pine_bush_sapling", {
description = "Pine Bush Sapling",
drawtype = "plantlike",
tiles = {"default_pine_bush_sapling.png"},
inventory_image = "default_pine_bush_sapling.png",
wield_image = "default_pine_bush_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
on_timer = default.grow_sapling,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
"default:pine_bush_sapling",
-- minp, maxp to be checked, relative to sapling pos
{x = -1, y = 0, z = -1},
{x = 1, y = 1, z = 1},
-- maximum interval of interior volume check
2)
return itemstack
end,
})
minetest.register_node("default:sand_with_kelp", {
description = "Kelp",
drawtype = "plantlike_rooted",
@ -2532,3 +2606,9 @@ default.register_leafdecay({
leaves = {"default:acacia_bush_leaves"},
radius = 1,
})
default.register_leafdecay({
trunks = {"default:pine_bush_stem"},
leaves = {"default:pine_bush_needles"},
radius = 1,
})