2013-01-20 22:15:54 +01:00
|
|
|
moretrees.avoidnodes = {}
|
2013-01-20 00:36:13 +01:00
|
|
|
|
2013-02-12 04:07:40 +01:00
|
|
|
moretrees.treelist = {
|
2013-04-09 04:54:22 +02:00
|
|
|
{"beech", "Beech Tree"},
|
2013-02-11 06:09:53 +01:00
|
|
|
{"apple_tree", "Apple Tree"},
|
|
|
|
{"oak", "Oak Tree", "acorn", "Acorn", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
|
|
|
{"sequoia", "Giant Sequoia"},
|
|
|
|
{"birch", "Birch Tree"},
|
|
|
|
{"palm", "Palm Tree", "coconut", "Coconut", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 1.0 },
|
|
|
|
{"spruce", "Spruce Tree", "spruce_cone", "Spruce Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
|
|
|
{"pine", "Pine Tree", "pine_cone", "Pine Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
|
|
|
{"willow", "Willow Tree"},
|
|
|
|
{"rubber_tree", "Rubber Tree"},
|
2013-01-25 05:22:46 +01:00
|
|
|
{"jungletree", "Jungle Tree"},
|
2013-02-11 06:09:53 +01:00
|
|
|
{"fir", "Douglas Fir", "fir_cone", "Fir Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
2013-01-20 00:36:13 +01:00
|
|
|
}
|
|
|
|
|
2013-02-12 04:07:40 +01:00
|
|
|
for i in ipairs(moretrees.treelist) do
|
|
|
|
local treename = moretrees.treelist[i][1]
|
|
|
|
local treedesc = moretrees.treelist[i][2]
|
|
|
|
local fruit = moretrees.treelist[i][3]
|
|
|
|
local fruitdesc = moretrees.treelist[i][4]
|
|
|
|
local selbox = moretrees.treelist[i][5]
|
|
|
|
local vscale = moretrees.treelist[i][6]
|
2013-02-11 06:09:53 +01:00
|
|
|
|
2013-03-19 22:01:09 +01:00
|
|
|
if treename ~= "jungletree" then -- the default game provides jungle tree nodes.
|
|
|
|
|
|
|
|
minetest.register_node("moretrees:"..treename.."_trunk", {
|
|
|
|
description = treedesc.." Trunk",
|
|
|
|
tiles = {
|
|
|
|
"moretrees_"..treename.."_trunk_top.png",
|
|
|
|
"moretrees_"..treename.."_trunk_top.png",
|
|
|
|
"moretrees_"..treename.."_trunk.png"
|
|
|
|
},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
2013-01-20 00:36:13 +01:00
|
|
|
|
2013-03-19 22:32:16 +01:00
|
|
|
minetest.register_node("moretrees:"..treename.."_trunk_sideways", {
|
|
|
|
description = "Sideways "..treedesc.." Trunk",
|
|
|
|
tiles = {
|
|
|
|
"moretrees_"..treename.."_trunk.png^[transformR90",
|
|
|
|
"moretrees_"..treename.."_trunk.png^[transformR90",
|
|
|
|
"moretrees_"..treename.."_trunk_top.png",
|
|
|
|
"moretrees_"..treename.."_trunk_top.png",
|
|
|
|
"moretrees_"..treename.."_trunk.png^[transformR90",
|
|
|
|
"moretrees_"..treename.."_trunk.png^[transformR90"
|
|
|
|
},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
})
|
|
|
|
|
2013-03-19 22:01:09 +01:00
|
|
|
minetest.register_node("moretrees:"..treename.."_planks", {
|
|
|
|
description = treedesc.." Planks",
|
|
|
|
tiles = {"moretrees_"..treename.."_wood.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
2013-01-20 00:36:13 +01:00
|
|
|
|
2013-03-19 22:01:09 +01:00
|
|
|
minetest.register_node("moretrees:"..treename.."_sapling", {
|
|
|
|
description = treedesc.." Sapling",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"moretrees_"..treename.."_sapling.png"},
|
|
|
|
inventory_image = "moretrees_"..treename.."_sapling.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
2013-01-22 02:31:28 +01:00
|
|
|
},
|
2013-03-19 22:01:09 +01:00
|
|
|
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1},
|
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
-- player will get a sapling with 1/100 chance
|
|
|
|
-- player will get leaves only if he/she gets no saplings,
|
|
|
|
-- this is because max_items is 1
|
2013-01-22 02:31:28 +01:00
|
|
|
|
2013-03-19 22:01:09 +01:00
|
|
|
minetest.register_node("moretrees:"..treename.."_leaves", {
|
|
|
|
description = treedesc.." Leaves",
|
|
|
|
drawtype = "allfaces_optional",
|
|
|
|
tiles = { "moretrees_"..treename.."_leaves.png" },
|
|
|
|
paramtype = "light",
|
|
|
|
groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{items = {"moretrees:"..treename.."_sapling"}, rarity = 100 },
|
|
|
|
{items = {"moretrees:"..treename.."_leaves"} }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
2013-01-20 00:36:13 +01:00
|
|
|
|
|
|
|
if (fruit ~= nil) then
|
|
|
|
minetest.register_node("moretrees:"..fruit, {
|
|
|
|
description = fruitdesc,
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "moretrees_"..fruit..".png" },
|
2013-01-25 05:22:46 +01:00
|
|
|
inventory_image = "moretrees_"..fruit..".png^[transformR180",
|
|
|
|
wield_image = "moretrees_"..fruit..".png^[transformR180",
|
|
|
|
visual_scale = vscale,
|
2013-01-20 00:36:13 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = selbox
|
|
|
|
},
|
2013-02-11 06:09:53 +01:00
|
|
|
groups = {fleshy=3,dig_immediate=3,flammable=2, attached_node=1},
|
2013-01-20 00:36:13 +01:00
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2013-01-25 05:22:46 +01:00
|
|
|
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
|
|
|
|
end
|
2013-01-22 02:31:28 +01:00
|
|
|
|
2013-01-25 05:22:46 +01:00
|
|
|
-- Extra leaves for jungle trees:
|
2013-01-22 02:31:28 +01:00
|
|
|
|
2013-01-25 05:22:46 +01:00
|
|
|
local jungleleaves = {"green","yellow","red"}
|
|
|
|
local jungleleavesnames = {"Green", "Yellow", "Red"}
|
2013-01-20 00:36:13 +01:00
|
|
|
for color = 1, 3 do
|
2013-01-25 05:22:46 +01:00
|
|
|
local leave_name = "moretrees:jungletree_leaves_"..jungleleaves[color]
|
2013-01-20 00:36:13 +01:00
|
|
|
minetest.register_node(leave_name, {
|
2013-01-25 05:22:46 +01:00
|
|
|
description = "Jungle Tree Leaves ("..jungleleavesnames[color]..")",
|
2013-01-20 00:36:13 +01:00
|
|
|
drawtype = "allfaces_optional",
|
2013-01-25 05:22:46 +01:00
|
|
|
tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..".png"},
|
2013-01-20 00:36:13 +01:00
|
|
|
paramtype = "light",
|
2013-02-14 03:25:24 +01:00
|
|
|
groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
|
2013-01-20 00:36:13 +01:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2013-01-31 03:51:18 +01:00
|
|
|
{items = {'moretrees:jungletree_sapling'}, rarity = 100 },
|
2013-01-25 05:22:46 +01:00
|
|
|
{items = {"moretrees:jungletree_leaves_"..jungleleaves[color]} }
|
2013-01-20 00:36:13 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2013-01-25 05:22:46 +01:00
|
|
|
-- Extra needles for firs
|
2013-01-20 00:36:13 +01:00
|
|
|
|
2013-01-22 02:50:41 +01:00
|
|
|
minetest.register_node("moretrees:fir_leaves_bright", {
|
2013-01-20 00:36:13 +01:00
|
|
|
drawtype = "allfaces_optional",
|
2013-01-27 19:17:27 +01:00
|
|
|
description = "Douglas Fir Leaves (Bright)",
|
2013-01-22 02:50:41 +01:00
|
|
|
tile_images = { "moretrees_fir_leaves_bright.png" },
|
2013-01-20 00:36:13 +01:00
|
|
|
paramtype = "light",
|
2013-01-22 02:31:28 +01:00
|
|
|
|
2013-02-14 03:25:24 +01:00
|
|
|
groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1 },
|
2013-01-20 00:36:13 +01:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2013-01-31 03:51:18 +01:00
|
|
|
{items = {'moretrees:fir_sapling'}, rarity = 100 },
|
2013-01-25 05:22:46 +01:00
|
|
|
{items = {'moretrees:fir_leaves'} }
|
2013-01-20 00:36:13 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults()
|
|
|
|
})
|
|
|
|
|
2013-02-11 18:23:05 +01:00
|
|
|
if moretrees.enable_redefine_apple then
|
|
|
|
minetest.register_node(":default:apple", {
|
|
|
|
description = "Apple",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
visual_scale = 1.0,
|
|
|
|
tiles = {"default_apple.png"},
|
|
|
|
inventory_image = "default_apple.png",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
|
|
|
},
|
|
|
|
groups = {fleshy=3,dig_immediate=3,flammable=2,attached_node=1},
|
|
|
|
on_use = minetest.item_eat(4),
|
|
|
|
sounds = default.node_sound_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2013-02-12 04:07:40 +01:00
|
|
|
table.insert(moretrees.avoidnodes, "default:jungletree")
|
|
|
|
table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
|
|
|
|
table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
|
2013-04-09 04:54:22 +02:00
|
|
|
table.insert(moretrees.avoidnodes, "default:tree")
|
2013-01-22 02:31:28 +01:00
|
|
|
|
2013-04-13 19:58:35 +02:00
|
|
|
-- "empty" (tapped) rubber tree nodes
|
|
|
|
|
|
|
|
minetest.register_node("moretrees:rubber_tree_trunk_empty", {
|
|
|
|
description = "Rubber Tree Trunk (Empty)",
|
|
|
|
tiles = {
|
|
|
|
"moretrees_rubber_tree_trunk_top.png",
|
|
|
|
"moretrees_rubber_tree_trunk_top.png",
|
|
|
|
"moretrees_rubber_tree_trunk_empty.png"
|
|
|
|
},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("moretrees:rubber_tree_trunk_empty_sideways", {
|
|
|
|
description = "Sideways Rubber Tree Trunk (Empty)",
|
|
|
|
tiles = {
|
|
|
|
"moretrees_rubber_tree_trunk_empty.png^[transformR90",
|
|
|
|
"moretrees_rubber_tree_trunk_empty.png^[transformR90",
|
|
|
|
"moretrees_rubber_tree_trunk_top.png",
|
|
|
|
"moretrees_rubber_tree_trunk_top.png",
|
|
|
|
"moretrees_rubber_tree_trunk_empty.png^[transformR90",
|
|
|
|
"moretrees_rubber_tree_trunk_empty.png^[transformR90"
|
|
|
|
},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2013-04-08 04:09:18 +02:00
|
|
|
-- For compatibility with old nodes and recently-changed nodes.
|
|
|
|
|
2013-04-13 19:58:35 +02:00
|
|
|
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
|
|
|
|
minetest.register_alias("farming_plus:rubber_tree_full", "moretrees:rubber_tree_trunk")
|
|
|
|
|
|
|
|
minetest.register_alias("technic:rubber_leaves", "moretrees:rubber_tree_leaves")
|
|
|
|
minetest.register_alias("farming_plus:rubber_leaves", "moretrees:rubber_tree_leaves")
|
|
|
|
|
|
|
|
minetest.register_alias("farming_plus:rubber_sapling", "moretrees:rubber_tree_sapling")
|
|
|
|
minetest.register_alias("technic:rubber_tree_sapling", "moretrees:rubber_tree_sapling")
|
2013-04-10 22:56:46 +02:00
|
|
|
|
2013-03-19 22:01:09 +01:00
|
|
|
minetest.register_alias("moretrees:jungletree_trunk", "default:jungletree")
|
|
|
|
minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
|
|
|
|
minetest.register_alias("moretrees:jungletree_sapling", "default:junglesapling")
|
|
|
|
minetest.register_alias("jungletree:sapling", "default:junglesapling")
|
2013-01-22 02:31:28 +01:00
|
|
|
|
Update 2013-04-17: Got rid of horizontal jungle tree trunk, aliased it
to the one in the moreblocks mod. Got rid of jungle tree planks recipe,
default already has it. But that's not the important part...
Acorns, fir/spruce/pine cones, and coconuts are now edible!
Fir/spruce/pine cones can be cooked to extract fir/spruce/pine nuts. One cone yields 4 portions of nuts, each of which heals 1/2 heart.
Coconuts can be broken apart to get milk and raw coconut solids (e.g. the "meat"). Craft one coconut, one drinking glass, and one cutting tool (*see below). Yields one portion of coconut solids, one glass full of coconut milk, and the tool is returned. The coconut milk heals 1 heart and returns the empty glass, while one portion of coconut solids heals two hearts.
Coconut milk can be crafted with four acorns to produce acorn muffin batter. One portion of this batter can be cooked into four acorn muffins. Each muffin restores two hearts.
Enjoy :-)
-----
* Since Minetest doesn't have any default cutting tools that would normally be suitable for this purpose, the following tools may be used instead to cut the coconuts open:
Default bronze, diamond, Mese, or steel axe,
...or... glooptest Alatro or Arol axe,
...or... moreores Mithril or silver axe,
...or... titanium axe.
(note that stone and wooden axes are deliberately not usable)
2013-04-18 01:30:17 +02:00
|
|
|
minetest.register_alias("moretrees:jungletree_trunk_sideways", "moreblocks:horizontal_jungle_tree")
|
|
|
|
|
2013-01-22 02:31:28 +01:00
|
|
|
minetest.register_alias("jungletree:leaves_green", "moretrees:jungletree_leaves_green")
|
|
|
|
minetest.register_alias("jungletree:leaves_red", "moretrees:jungletree_leaves_red")
|
|
|
|
minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
|
|
|
|
|
2013-01-22 02:50:41 +01:00
|
|
|
minetest.register_alias("moretrees:conifer_trunk", "moretrees:fir_trunk")
|
|
|
|
minetest.register_alias("moretrees:conifer_trunk_sideways", "moretrees:fir_trunk_sideways")
|
|
|
|
minetest.register_alias("moretrees:conifer_leaves", "moretrees:fir_leaves")
|
|
|
|
minetest.register_alias("moretrees:conifer_leaves_bright", "moretrees:fir_leaves_bright")
|
|
|
|
minetest.register_alias("moretrees:conifer_sapling", "moretrees:fir_sapling")
|
|
|
|
|
|
|
|
minetest.register_alias("conifers:trunk", "moretrees:fir_trunk")
|
|
|
|
minetest.register_alias("conifers:trunk_reversed", "moretrees:fir_trunk_sideways")
|
|
|
|
minetest.register_alias("conifers:leaves", "moretrees:fir_leaves")
|
|
|
|
minetest.register_alias("conifers:leaves_special", "moretrees:fir_leaves_bright")
|
|
|
|
minetest.register_alias("conifers:sapling", "moretrees:fir_sapling")
|
2013-01-22 02:31:28 +01:00
|
|
|
|