forked from mtcontrib/minetest-mod-snow
Fix missing snow leaves and apple leavesdecay
This commit is contained in:
parent
600eaa2313
commit
0dcf9b5f0e
@ -241,7 +241,6 @@ nodedef = {
|
|||||||
groups = leaves.groups,
|
groups = leaves.groups,
|
||||||
drop = leaves.drop,
|
drop = leaves.drop,
|
||||||
sounds = leaves.sounds,
|
sounds = leaves.sounds,
|
||||||
on_timer = leaves.on_timer, -- timer from leafdecay
|
|
||||||
}
|
}
|
||||||
nodedef.groups.flammable = 1
|
nodedef.groups.flammable = 1
|
||||||
|
|
||||||
@ -267,16 +266,12 @@ nodedef.groups.flammable = 1
|
|||||||
minetest.register_node("snow:apple", nodedef)
|
minetest.register_node("snow:apple", nodedef)
|
||||||
snow.known_plants[minetest.get_content_id("default:apple")] = minetest.get_content_id("snow:apple")
|
snow.known_plants[minetest.get_content_id("default:apple")] = minetest.get_content_id("snow:apple")
|
||||||
|
|
||||||
local dec_func = leafdecay_after_destruct
|
-- decay from default/nodes.lua:2537
|
||||||
function leafdecay_after_destruct(pos, oldnode, def)
|
default.register_leafdecay{
|
||||||
if def.trunks[1] ~= "default:tree" then
|
trunks = {"default:tree"},
|
||||||
return dec_func(pos, oldnode, def)
|
leaves = {"snow:apple", "snow:leaves"},
|
||||||
end
|
radius = minetest.get_mapgen_setting"mg_name" == "v6" and 2 or 3,
|
||||||
def.leaves[#def.leaves+1] = "snow:leaves"
|
}
|
||||||
def.leaves[#def.leaves+1] = "snow:apple"
|
|
||||||
leafdecay_after_destruct = dec_func
|
|
||||||
return leafdecay_after_destruct(pos, oldnode, def)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- TODO
|
-- TODO
|
||||||
snow.known_plants[minetest.get_content_id("default:jungleleaves")] = minetest.get_content_id("default:jungleleaves")
|
snow.known_plants[minetest.get_content_id("default:jungleleaves")] = minetest.get_content_id("default:jungleleaves")
|
||||||
|
Loading…
Reference in New Issue
Block a user