mirror of
https://github.com/mt-mods/moretrees.git
synced 2024-12-27 03:00:24 +01:00
fix broken leafdecay on jungle tree and fir tree
This commit is contained in:
parent
3d7bcca134
commit
37e39a9ba7
@ -337,7 +337,6 @@ minetest.override_item("moretrees:poplar_leaves", {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Extra nodes for jungle trees:
|
-- Extra nodes for jungle trees:
|
||||||
|
|
||||||
local jungleleaves = {"yellow","red"}
|
local jungleleaves = {"yellow","red"}
|
||||||
@ -362,7 +361,7 @@ for color = 1, #jungleleaves do
|
|||||||
inventory_image = moretrees_leaves_inventory_image,
|
inventory_image = moretrees_leaves_inventory_image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius },
|
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = 3 },
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -374,6 +373,18 @@ for color = 1, #jungleleaves do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- To get Moretrees to generate its own jungle trees among the default mapgen
|
||||||
|
-- we need our own copy of that node, which moretrees will match against.
|
||||||
|
|
||||||
|
local jungle_tree = table.copy(minetest.registered_nodes["default:jungletree"])
|
||||||
|
minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
|
||||||
|
|
||||||
|
default.register_leafdecay({
|
||||||
|
trunks = { "default:jungletree", "moretrees:jungletree_trunk" },
|
||||||
|
leaves = { "default:jungleleaves", "moretrees:jungletree_leaves_yellow", "moretrees:jungletree_leaves_red" },
|
||||||
|
radius = moretrees.leafdecay_radius,
|
||||||
|
})
|
||||||
|
|
||||||
-- Extra needles for firs
|
-- Extra needles for firs
|
||||||
|
|
||||||
local moretrees_leaves_inventory_image = nil
|
local moretrees_leaves_inventory_image = nil
|
||||||
@ -391,7 +402,7 @@ minetest.register_node("moretrees:fir_leaves_bright", {
|
|||||||
inventory_image = moretrees_leaves_inventory_image,
|
inventory_image = moretrees_leaves_inventory_image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius },
|
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = 3 },
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -402,6 +413,13 @@ minetest.register_node("moretrees:fir_leaves_bright", {
|
|||||||
sounds = default.node_sound_leaves_defaults()
|
sounds = default.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
default.register_leafdecay({
|
||||||
|
trunks = { "moretrees:fir_trunk" },
|
||||||
|
leaves = { "moretrees:fir_leaves", "moretrees:fir_leaves_bright" },
|
||||||
|
radius = moretrees.leafdecay_radius,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
if moretrees.enable_redefine_apple then
|
if moretrees.enable_redefine_apple then
|
||||||
local appledef = moretrees.clone_node("default:apple")
|
local appledef = moretrees.clone_node("default:apple")
|
||||||
appledef.groups.attached_node = 1
|
appledef.groups.attached_node = 1
|
||||||
@ -449,12 +467,6 @@ minetest.register_abm({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- To get Moretrees to generate its own jungle trees among the default mapgen
|
|
||||||
-- we need our own copy of that node, which moretrees will match against.
|
|
||||||
|
|
||||||
local jungle_tree = moretrees.clone_node("default:jungletree")
|
|
||||||
minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
|
|
||||||
|
|
||||||
-- For compatibility with old nodes, recently-changed nodes, and default nodes
|
-- For compatibility with old nodes, recently-changed nodes, and default nodes
|
||||||
|
|
||||||
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
|
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
|
||||||
|
Loading…
Reference in New Issue
Block a user