forked from mtcontrib/moretrees
Jungle nodes are defined and used by minetest_game now,
so we don't need them in moretrees anymore. They're still used by moretrees to generate out versions of jungletrees, though, and red/green/yellow leaves are also still provided and defined.
This commit is contained in:
parent
3eb576fca6
commit
f100397cfd
@ -58,6 +58,7 @@ end
|
|||||||
if moretrees.enable_replace_default_trees then
|
if moretrees.enable_replace_default_trees then
|
||||||
minetest.register_alias("mapgen_tree", "air")
|
minetest.register_alias("mapgen_tree", "air")
|
||||||
minetest.register_alias("mapgen_leaves", "air")
|
minetest.register_alias("mapgen_leaves", "air")
|
||||||
|
minetest.register_alias("mapgen_apple", "air")
|
||||||
plantslib:register_generate_plant(moretrees.beech_biome, moretrees.beech_model)
|
plantslib:register_generate_plant(moretrees.beech_biome, moretrees.beech_model)
|
||||||
|
|
||||||
elseif moretrees.enable_default_leafdecay then
|
elseif moretrees.enable_default_leafdecay then
|
||||||
|
@ -23,6 +23,7 @@ for i in ipairs(moretrees.treelist) do
|
|||||||
local selbox = moretrees.treelist[i][5]
|
local selbox = moretrees.treelist[i][5]
|
||||||
local vscale = moretrees.treelist[i][6]
|
local vscale = moretrees.treelist[i][6]
|
||||||
|
|
||||||
|
if treename ~= "jungletree" then -- the default game provides jungle tree nodes.
|
||||||
|
|
||||||
minetest.register_node("moretrees:"..treename.."_trunk", {
|
minetest.register_node("moretrees:"..treename.."_trunk", {
|
||||||
description = treedesc.." Trunk",
|
description = treedesc.." Trunk",
|
||||||
@ -36,22 +37,6 @@ for i in ipairs(moretrees.treelist) do
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
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",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("moretrees:"..treename.."_planks", {
|
minetest.register_node("moretrees:"..treename.."_planks", {
|
||||||
description = treedesc.." Planks",
|
description = treedesc.." Planks",
|
||||||
tiles = {"moretrees_"..treename.."_wood.png"},
|
tiles = {"moretrees_"..treename.."_wood.png"},
|
||||||
@ -75,6 +60,28 @@ for i in ipairs(moretrees.treelist) do
|
|||||||
sounds = default.node_sound_defaults(),
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
if (fruit ~= nil) then
|
if (fruit ~= nil) then
|
||||||
minetest.register_node("moretrees:"..fruit, {
|
minetest.register_node("moretrees:"..fruit, {
|
||||||
description = fruitdesc,
|
description = fruitdesc,
|
||||||
@ -95,28 +102,21 @@ for i in ipairs(moretrees.treelist) do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- player will get a sapling with 1/100 chance
|
minetest.register_node("moretrees:"..treename.."_trunk_sideways", {
|
||||||
-- player will get leaves only if he/she gets no saplings,
|
description = "Sideways "..treedesc.." Trunk",
|
||||||
-- this is because max_items is 1
|
tiles = {
|
||||||
|
"moretrees_"..treename.."_trunk.png^[transformR90",
|
||||||
if treename ~= "jungletree" then
|
"moretrees_"..treename.."_trunk.png^[transformR90",
|
||||||
minetest.register_node("moretrees:"..treename.."_leaves", {
|
"moretrees_"..treename.."_trunk_top.png",
|
||||||
description = treedesc.." Leaves",
|
"moretrees_"..treename.."_trunk_top.png",
|
||||||
drawtype = "allfaces_optional",
|
"moretrees_"..treename.."_trunk.png^[transformR90",
|
||||||
tiles = { "moretrees_"..treename.."_leaves.png" },
|
"moretrees_"..treename.."_trunk.png^[transformR90"
|
||||||
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"} }
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
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",
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
|
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
|
||||||
end
|
end
|
||||||
@ -187,19 +187,18 @@ table.insert(moretrees.avoidnodes, "default:jungletree")
|
|||||||
table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
|
table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
|
||||||
table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
|
table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
|
||||||
|
|
||||||
-- Backward compatbility with old mods/nodes:
|
-- For compatibility with newly-re-introduced default jungles and related nodes.
|
||||||
minetest.registered_items["jungletree"] = nil
|
|
||||||
minetest.registered_aliases["jungletree"] = nil
|
|
||||||
minetest.registered_items["default:jungletree"] = nil
|
|
||||||
minetest.registered_aliases["default:jungletree"] = nil
|
|
||||||
|
|
||||||
minetest.register_alias("jungletree", "moretrees:jungletree_trunk")
|
minetest.register_alias("moretrees:jungletree_trunk", "default:jungletree")
|
||||||
minetest.register_alias("default:jungletree", "moretrees:jungletree_trunk")
|
minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
|
||||||
|
minetest.register_alias("moretrees:jungletree_sapling", "default:junglesapling")
|
||||||
|
minetest.register_alias("jungletree:sapling", "default:junglesapling")
|
||||||
|
|
||||||
|
-- These next ones are for the old jungle trees and conifers mods.
|
||||||
|
|
||||||
minetest.register_alias("jungletree:leaves_green", "moretrees:jungletree_leaves_green")
|
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_red", "moretrees:jungletree_leaves_red")
|
||||||
minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
|
minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
|
||||||
minetest.register_alias("jungletree:sapling", "moretrees:jungletree_sapling")
|
|
||||||
|
|
||||||
minetest.register_alias("moretrees:conifer_trunk", "moretrees:fir_trunk")
|
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_trunk_sideways", "moretrees:fir_trunk_sideways")
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
-- Global configuration variables
|
-- Global configuration variables
|
||||||
|
|
||||||
-- Enable replacement of default trees with birch if you want but be warned -
|
-- Enable replacement of default trees with beech if you want but be warned -
|
||||||
-- due to bugs in the speed of the engine's map generator/loader, doing so\
|
-- due to bugs in the speed of the engine's map generator/loader, doing so
|
||||||
-- will slow it WAY down.
|
-- will slow it WAY down. Note: The code that uses this variable is in
|
||||||
|
-- leafdecay.lua because of how it interacts with settings related to that
|
||||||
|
-- function.
|
||||||
|
|
||||||
moretrees.enable_replace_default_trees = false
|
moretrees.enable_replace_default_trees = false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user