Skip to content

Commit

Permalink
fix large cactus seedling growth
Browse files Browse the repository at this point in the history
  • Loading branch information
tenplus1 committed May 8, 2022
1 parent 4c50a02 commit 804343f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions init.lua
Expand Up @@ -62,7 +62,7 @@ local saplings = {
{"default:blueberry_bush_sapling", default.grow_blueberry_bush, "soil"},
{"default:pine_bush_sapling", default.grow_pine_bush, "soil"},
{"default:cactus", cactus_grow, "sand"},
{"default:papyrus", papyrus_grow, "soil"},
{"default:papyrus", papyrus_grow, "soil"}
}

-- helper tables ( "" denotes a blank item )
Expand Down Expand Up @@ -475,7 +475,8 @@ function bonemeal:on_use(pos, strength, node)
end

-- 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
check_sapling(pos, node.name)
return true
Expand Down Expand Up @@ -621,28 +622,24 @@ minetest.register_craft({

-- bonemeal (from bone)
minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:bonemeal 2",
recipe = {{"group:bone"}}
})

-- bonemeal (from player bones)
minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:bonemeal 4",
recipe = {{"bones:bones"}}
})

-- bonemeal (from coral skeleton)
minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:bonemeal 2",
recipe = {{"default:coral_skeleton"}}
})

-- mulch
minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:mulch 4",
recipe = {
{"group:tree", "group:leaves", "group:leaves"},
Expand All @@ -652,7 +649,6 @@ minetest.register_craft({
})

minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:mulch",
recipe = {
{"group:seed", "group:seed", "group:seed"},
Expand All @@ -663,7 +659,6 @@ minetest.register_craft({

-- fertiliser
minetest.register_craft({
-- type = "shapeless",
output = "bonemeal:fertiliser 2",
recipe = {{"bonemeal:bonemeal", "bonemeal:mulch"}}
})
Expand All @@ -690,4 +685,5 @@ minetest.override_item("default:dirt", {
dofile(path .. "/mods.lua")
dofile(path .. "/lucky_block.lua")


print ("[MOD] bonemeal loaded")

0 comments on commit 804343f

Please sign in to comment.