0
0
Fork 0

Update init.lua to register dropper callback.

This commit is contained in:
Michieal 2023-02-08 21:09:16 -05:00
parent 14383d6c6f
commit f81d530912
1 changed files with 33 additions and 24 deletions

View File

@ -34,7 +34,15 @@ minetest.register_abm({
mcl_bamboo.grow_bamboo(pos, false) mcl_bamboo.grow_bamboo(pos, false)
end, end,
}) })
minetest.register_abm({
if minetest.get_modpath("mesecons_mvps") then
if mesecons_mvps then
for x = 1, #mcl_bamboo.bamboo_index do
mesecon.register_mvps_dropper(mcl_bamboo.bamboo_index[x], mcl_bamboo.break_orphaned)
end
end
else
minetest.register_abm({
label = "Break Orphaned Bamboo", label = "Break Orphaned Bamboo",
nodenames = mcl_bamboo.bamboo_index, nodenames = mcl_bamboo.bamboo_index,
interval = 1.5, interval = 1.5,
@ -61,7 +69,8 @@ minetest.register_abm({
minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true) minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true)
minetest.add_item(pos, istack) minetest.add_item(pos, istack)
end, end,
}) })
end
-- Base Aliases. -- Base Aliases.
local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding" local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding"