fix large cactus seedling growth

This commit is contained in:
tenplus1 2022-05-08 10:29:10 +01:00
parent 4c50a02a0e
commit 804343f7c0

@ -62,7 +62,7 @@ local saplings = {
{"default:blueberry_bush_sapling", default.grow_blueberry_bush, "soil"}, {"default:blueberry_bush_sapling", default.grow_blueberry_bush, "soil"},
{"default:pine_bush_sapling", default.grow_pine_bush, "soil"}, {"default:pine_bush_sapling", default.grow_pine_bush, "soil"},
{"default:cactus", cactus_grow, "sand"}, {"default:cactus", cactus_grow, "sand"},
{"default:papyrus", papyrus_grow, "soil"}, {"default:papyrus", papyrus_grow, "soil"}
} }
-- helper tables ( "" denotes a blank item ) -- helper tables ( "" denotes a blank item )
@ -475,7 +475,8 @@ function bonemeal:on_use(pos, strength, node)
end end
-- check for tree growth if pointing at sapling -- check for tree growth if pointing at sapling
if minetest.get_item_group(node.name, "sapling") > 0 if (minetest.get_item_group(node.name, "sapling") > 0
or node.name == "default:large_cactus_seedling")
and random(5 - strength) == 1 then and random(5 - strength) == 1 then
check_sapling(pos, node.name) check_sapling(pos, node.name)
return true return true
@ -621,28 +622,24 @@ minetest.register_craft({
-- bonemeal (from bone) -- bonemeal (from bone)
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:bonemeal 2", output = "bonemeal:bonemeal 2",
recipe = {{"group:bone"}} recipe = {{"group:bone"}}
}) })
-- bonemeal (from player bones) -- bonemeal (from player bones)
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:bonemeal 4", output = "bonemeal:bonemeal 4",
recipe = {{"bones:bones"}} recipe = {{"bones:bones"}}
}) })
-- bonemeal (from coral skeleton) -- bonemeal (from coral skeleton)
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:bonemeal 2", output = "bonemeal:bonemeal 2",
recipe = {{"default:coral_skeleton"}} recipe = {{"default:coral_skeleton"}}
}) })
-- mulch -- mulch
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:mulch 4", output = "bonemeal:mulch 4",
recipe = { recipe = {
{"group:tree", "group:leaves", "group:leaves"}, {"group:tree", "group:leaves", "group:leaves"},
@ -652,7 +649,6 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:mulch", output = "bonemeal:mulch",
recipe = { recipe = {
{"group:seed", "group:seed", "group:seed"}, {"group:seed", "group:seed", "group:seed"},
@ -663,7 +659,6 @@ minetest.register_craft({
-- fertiliser -- fertiliser
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:fertiliser 2", output = "bonemeal:fertiliser 2",
recipe = {{"bonemeal:bonemeal", "bonemeal:mulch"}} recipe = {{"bonemeal:bonemeal", "bonemeal:mulch"}}
}) })
@ -690,4 +685,5 @@ minetest.override_item("default:dirt", {
dofile(path .. "/mods.lua") dofile(path .. "/mods.lua")
dofile(path .. "/lucky_block.lua") dofile(path .. "/lucky_block.lua")
print ("[MOD] bonemeal loaded") print ("[MOD] bonemeal loaded")