mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Merge pull request 'Make cactus destroy items' (#1567) from NO11/MineClone2:master into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1567
This commit is contained in:
commit
3fbeab7c85
1 changed files with 16 additions and 0 deletions
|
@ -190,6 +190,22 @@ minetest.register_abm({
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Make cactus destroy items
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Cactus destroy items",
|
||||||
|
nodenames = {"mcl_core:cactus"},
|
||||||
|
interval = 1,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
for _,object in pairs(minetest.get_objects_inside_radius(pos, 0.9)) do
|
||||||
|
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then
|
||||||
|
object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Sugar canes growth",
|
label = "Sugar canes growth",
|
||||||
nodenames = {"mcl_core:reeds"},
|
nodenames = {"mcl_core:reeds"},
|
||||||
|
|
Loading…
Reference in a new issue