0
0
Fork 0

Make placed mangrove leaves always become player leaves

The same thing as with the `mcl_core` leaves.
This commit is contained in:
FossFanatic 2023-02-10 10:41:43 +00:00
parent fdb2333493
commit 6744967d02
1 changed files with 9 additions and 6 deletions

View File

@ -118,15 +118,18 @@ local pl_def = {
end end
end end
end, end,
} after_place_node = function(pos)
mcl_core.make_player_leaves(pos) -- Leaves placed by the player should always be player leaves.
end,
}
minetest.register_node("mcl_mangrove:playermangroveleaves", pl_def) minetest.register_node("mcl_mangrove:mangroveleaves_player", pl_def)
local l_def = table.copy(pl_def) local l_def = table.copy(pl_def)
l_def.groups.player_leaves = nil l_def.groups.player_leaves = nil
l_def.groups.not_in_creative_inventory = 1 l_def.groups.not_in_creative_inventory = 1
l_def._mcl_shears_drop = {"mcl_mangrove:playermangroveleaves"} l_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves_player"}
l_def._mcl_silk_touch_drop = {"mcl_mangrove:playermangroveleaves"} l_def._mcl_silk_touch_drop = {"mcl_mangrove:mangroveleaves_player"}
minetest.register_node("mcl_mangrove:mangroveleaves", l_def) minetest.register_node("mcl_mangrove:mangroveleaves", l_def)
@ -134,8 +137,8 @@ local o_def = table.copy(l_def)
o_def._doc_items_create_entry = false o_def._doc_items_create_entry = false
o_def.groups.not_in_creative_inventory = 1 o_def.groups.not_in_creative_inventory = 1
o_def.groups.orphan_leaves = 1 o_def.groups.orphan_leaves = 1
o_def._mcl_shears_drop = {"mcl_mangrove:playermangroveleaves"} o_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves_player"}
o_def._mcl_silk_touch_drop = {"mcl_mangrove:playermangroveleaves"} o_def._mcl_silk_touch_drop = {"mcl_mangrove:mangroveleaves_player"}
minetest.register_node("mcl_mangrove:mangroveleaves_orphan", o_def) minetest.register_node("mcl_mangrove:mangroveleaves_orphan", o_def)