oak, hollytree
|
@ -1,4 +1,4 @@
|
|||
name = baldcypress
|
||||
description = Blad Cypress for Swamps
|
||||
description = Bald Cypress for Swamps
|
||||
depends = default
|
||||
optional_depends = stairs, bonemeal
|
||||
optional_depends = stairs, bonemeal, swampz
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
--
|
||||
-- Birch Tree
|
||||
--
|
||||
|
@ -90,21 +89,22 @@ end
|
|||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_on = {"rainf:meadow"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.008,
|
||||
offset = 0.01,
|
||||
scale = 0.001,
|
||||
spread = {x = 255, y = 255, z = 255},
|
||||
seed = 89,
|
||||
seed = 32,
|
||||
octaves = 3,
|
||||
persist = 0.67
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
y_min = 10,
|
||||
biomes = {"rainf"},
|
||||
y_min = 1,
|
||||
y_max = 80,
|
||||
schematic = birch.birchtree,
|
||||
flags = "place_center_x, place_center_z",
|
||||
place_offset_y = 1,
|
||||
})
|
||||
|
||||
--
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name = birch
|
||||
description = Birch Tree for Grassland
|
||||
depends = default
|
||||
depends = rainf, default
|
||||
optional_depends = stairs, bonemeal
|
||||
|
|
|
@ -44,7 +44,10 @@ minetest.register_node("cherrytree:cherries", {
|
|||
pos.y = pos.y + 1
|
||||
local node_above = minetest.get_node_or_nil(pos)
|
||||
if node_above and node_above.param2 == 0 and node_above.name == "cherrytree:blossom_leaves" then
|
||||
minetest.get_node_timer(pos):start(fruit_grow_time)
|
||||
--20% of variation on time
|
||||
local twenty_percent = fruit_grow_time * 0.2
|
||||
local grow_time = math.random(fruit_grow_time - twenty_percent, fruit_grow_time + twenty_percent)
|
||||
minetest.get_node_timer(pos):start(grow_time)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -173,7 +176,16 @@ minetest.register_node("cherrytree:blossom_leaves", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = default.after_place_leaves,
|
||||
|
||||
decay
|
||||
on_timer = function(pos)
|
||||
pos.y = pos.y - 1
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if node and node.name == "air" then
|
||||
minetest.set_node(pos, {name = "cherrytree:cherries"})
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- cherrytree tree leaves
|
||||
|
|
|
@ -69,17 +69,17 @@ end
|
|||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_on = {"rainf:meadow"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.00005,
|
||||
offset = 0.0008,
|
||||
scale = 0.00004,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 278,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
biomes = {"rainf"},
|
||||
y_min = 1,
|
||||
y_max = 80,
|
||||
schematic = modpath.."/schematics/chestnuttree.mts",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name = chestnuttree
|
||||
description = Chesnut Tree for Grassland
|
||||
depends = default
|
||||
depends = rainf, default
|
||||
optional_depends = stairs, bonemeal
|
||||
|
|
|
@ -45,6 +45,7 @@ if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
|||
schematic = modpath.."/schematics/ebony.mts",
|
||||
flags = "place_center_x, place_center_z, force_placement",
|
||||
rotation = "random",
|
||||
place_offset_y = -1,
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
--
|
||||
-- Hollytree
|
||||
--
|
||||
local modname = "hollytree"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
-- internationalization boilerplate
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
-- Hollytree
|
||||
|
||||
local function grow_new_hollytree_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic({x = pos.x-4, y = pos.y, z = pos.z-4}, modpath.."/schematics/hollytree.mts", "0", nil, false)
|
||||
end
|
||||
|
||||
--
|
||||
-- Decoration
|
||||
--
|
||||
|
||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"rainf:meadow"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0008,
|
||||
scale = 0.00005,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 789,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"rainf"},
|
||||
y_min = 1,
|
||||
y_max = 32,
|
||||
schematic = modpath.."/schematics/hollytree.mts",
|
||||
flags = "place_center_x, place_center_z, force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
end
|
||||
|
||||
--
|
||||
-- Nodes
|
||||
--
|
||||
|
||||
minetest.register_node("hollytree:sapling", {
|
||||
description = S("Holly Tree Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"hollytree_sapling.png"},
|
||||
inventory_image = "hollytree_sapling.png",
|
||||
wield_image = "hollytree_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_new_hollytree_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 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(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"hollytree:sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 6, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("hollytree:trunk", {
|
||||
description = S("Holly Tree Trunk"),
|
||||
tiles = {
|
||||
"hollytree_trunk_top.png",
|
||||
"hollytree_trunk_top.png",
|
||||
"hollytree_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- hollytree wood
|
||||
minetest.register_node("hollytree:wood", {
|
||||
description = S("Holly Tree Wood"),
|
||||
tiles = {"hollytree_wood.png"},
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-- hollytree tree leaves
|
||||
minetest.register_node("hollytree:leaves", {
|
||||
description = S("Holly Tree Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"hollytree_leaves.png"},
|
||||
inventory_image = "hollytree_leaves.png",
|
||||
wield_image = "hollytree_leaves.png",
|
||||
paramtype = "light",
|
||||
walkable = true,
|
||||
waving = 1,
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"hollytree:sapling"}, rarity = 20},
|
||||
{items = {"hollytree:leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
--
|
||||
-- Craftitems
|
||||
--
|
||||
|
||||
--
|
||||
-- Recipes
|
||||
--
|
||||
|
||||
minetest.register_craft({
|
||||
output = "hollytree:wood 4",
|
||||
recipe = {{"hollytree:trunk"}}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "hollytree:trunk",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "hollytree:wood",
|
||||
burntime = 7,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "hollytree:convert_hollytree_saplings_to_node_timer",
|
||||
nodenames = {"hollytree:sapling"},
|
||||
action = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"hollytree:trunk"},
|
||||
leaves = {"hollytree:leaves"},
|
||||
radius = 3,
|
||||
})
|
||||
|
||||
--Stairs
|
||||
|
||||
if minetest.get_modpath("stairs") ~= nil then
|
||||
stairs.register_stair_and_slab(
|
||||
"hollytree_trunk",
|
||||
"hollytree:trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
{"hollytree_wood.png"},
|
||||
S("Cherry Tree Stair"),
|
||||
S("Cherry Tree Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
end
|
||||
|
||||
--Support for bonemeal
|
||||
|
||||
if minetest.get_modpath("bonemeal") ~= nil then
|
||||
bonemeal:add_sapling({
|
||||
{"hollytree:sapling", grow_new_hollytree_tree, "soil"},
|
||||
})
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
# textdomain: hollytree
|
||||
Holly Tree Trunk=Madera de acebo
|
||||
Holly Tree Wood=Tablas de acebo
|
||||
Holly Tree Leaves=Hojas de acebo
|
||||
Holly Tree Wood=Tablas de acebo
|
||||
Holly Tree Sapling=Retoño de acebo
|
||||
Holly TreeTree Stair=Escaleras de acebo
|
||||
Holly TreeTree Slab=Losa de acebo
|
||||
Inner Holly Tree Tree Stair=Escaleras de acebo interior
|
||||
Outer Holly Tree Tree Stair=Escaleras de acebo exterior
|
||||
Holly Tree Slab=Losa de acebo
|
|
@ -0,0 +1,4 @@
|
|||
name = hollytree
|
||||
description = Hollytree
|
||||
depends = rainf, default
|
||||
optional_depends = stairs, bonemeal
|
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
|
@ -28,17 +28,17 @@ end
|
|||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_on = {"rainf:meadow"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0002,
|
||||
offset = 0.0005,
|
||||
scale = 0.0002,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 3462,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
biomes = {"rainf"},
|
||||
y_min = 1,
|
||||
y_max = 62,
|
||||
schematic = modpath.."/schematics/maple.mts",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name = maple
|
||||
description = Maple Tree
|
||||
depends = default
|
||||
depends = rainf, default
|
||||
optional_depends = stairs, bonemeal
|
||||
|
|
|
@ -0,0 +1,218 @@
|
|||
--
|
||||
-- Oak
|
||||
--
|
||||
|
||||
local modname = "oak"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
-- internationalization boilerplate
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
--Acorn
|
||||
|
||||
minetest.register_node("oak:acorn", {
|
||||
description = S("Acorn"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"oak_acorn.png"},
|
||||
inventory_image = "oak_acorn.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
|
||||
},
|
||||
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 3, leafdecay_drop = 1},
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
minetest.set_node(pos, {name = "oak:acorn", param2 = 1})
|
||||
end,
|
||||
})
|
||||
|
||||
-- oak
|
||||
|
||||
local function grow_new_oak_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(1, 1))
|
||||
return
|
||||
end
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-5}, modpath.."/schematics/oak.mts", "0", nil, false)
|
||||
end
|
||||
|
||||
--
|
||||
-- Decoration
|
||||
--
|
||||
|
||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"rainf:meadow"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0008,
|
||||
scale = 0.00004,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 6431,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"rainf"},
|
||||
y_min = 1,
|
||||
y_max = 80,
|
||||
schematic = modpath.."/schematics/oak.mts",
|
||||
flags = "place_center_x, place_center_z, force_placement",
|
||||
rotation = "random",
|
||||
place_offset_y = 0,
|
||||
})
|
||||
end
|
||||
|
||||
--
|
||||
-- Nodes
|
||||
--
|
||||
|
||||
minetest.register_node("oak:sapling", {
|
||||
description = S("Oak Sapling"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"oak_sapling.png"},
|
||||
inventory_image = "oak_sapling.png",
|
||||
wield_image = "oak_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_new_oak_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 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(1,1))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"oak:sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 6, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("oak:trunk", {
|
||||
description = S("Oak Trunk"),
|
||||
tiles = {
|
||||
"oak_trunk_top.png",
|
||||
"oak_trunk_top.png",
|
||||
"oak_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- oak wood
|
||||
minetest.register_node("oak:wood", {
|
||||
description = S("Oak Wood"),
|
||||
tiles = {"oak_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-- oak tree leaves
|
||||
minetest.register_node("oak:leaves", {
|
||||
description = S("Oak Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"oak_leaves.png"},
|
||||
inventory_image = "oak_leaves.png",
|
||||
wield_image = "oak_leaves.png",
|
||||
paramtype = "light",
|
||||
walkable = true,
|
||||
waving = 1,
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"oak:sapling"}, rarity = 20},
|
||||
{items = {"oak:leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
--
|
||||
-- Craftitems
|
||||
--
|
||||
|
||||
--
|
||||
-- Recipes
|
||||
--
|
||||
|
||||
minetest.register_craft({
|
||||
output = "oak:wood 4",
|
||||
recipe = {{"oak:trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "oak:trunk",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "oak:wood",
|
||||
burntime = 7,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "oak:convert_oak_saplings_to_node_timer",
|
||||
nodenames = {"oak:sapling"},
|
||||
action = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1, 1))
|
||||
end
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"oak:trunk"},
|
||||
leaves = {"oak:leaves"},
|
||||
radius = 3,
|
||||
})
|
||||
|
||||
--Stairs
|
||||
|
||||
if minetest.get_modpath("stairs") ~= nil then
|
||||
stairs.register_stair_and_slab(
|
||||
"oak_trunk",
|
||||
"oak:trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
{"oak_wood.png"},
|
||||
S("Oak Stair"),
|
||||
S("Oak Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("bonemeal") ~= nil then
|
||||
bonemeal:add_sapling({
|
||||
{"oak:sapling", grow_new_oak_tree, "soil"},
|
||||
})
|
||||
end
|
|
@ -0,0 +1,10 @@
|
|||
# textdomain: oak
|
||||
Acorn=Bellota
|
||||
Oak Sapling=Retoño de roble
|
||||
Oak Trunk=Madera de roble
|
||||
Oak Wood=Tablas de roble
|
||||
Oak Inner Stair=Escalera interior de roble
|
||||
Oak Leaves=Hojas de roble
|
||||
Oak Outer Stair=Escalera exterior de roble
|
||||
Oak Slab=Losa de roble
|
||||
Oak Stair=Escalera de roble
|
|
@ -0,0 +1,4 @@
|
|||
name = oak
|
||||
description = Oak Tree
|
||||
depends = rainf, default
|
||||
optional_depends = stairs, bonemeal
|
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 2.7 KiB |
|
@ -1,4 +1,4 @@
|
|||
name = willow
|
||||
description = Willow Tree for Swampy Biomes
|
||||
depends = default
|
||||
optional_depends = stairs, bonemeal
|
||||
optional_depends = stairs, bonemeal, swampz
|
||||
|
|