From d16f5b00fe7ff7ff938dedc83f4f1cd8286cbd7d Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Mon, 30 Apr 2018 19:04:57 +0300 Subject: bonemeal integration --- README.md | 4 +++- depends.txt | 1 + init.lua | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c137fc..cd2b1d8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ This mod adds a maple tree to the minetest game. Originally written for the Home ## Bonemeal -If you are using the bonemeal mod, add this to mods.lua to enable maple support: +The mod now registers itself with the bonemeal API, and saplings should be recognized automatically. + +~~If you are using the bonemeal mod, you can add this to mods.lua to enable maple support:~~ ``` if minetest.get_modpath("maple") then diff --git a/depends.txt b/depends.txt index 4ad96d5..a9da8e4 100644 --- a/depends.txt +++ b/depends.txt @@ -1 +1,2 @@ default +bonemeal? \ No newline at end of file diff --git a/init.lua b/init.lua index 76c814c..93a9cf4 100644 --- a/init.lua +++ b/init.lua @@ -147,3 +147,11 @@ minetest.register_craft({ recipe = "maple:fence_maple_wood", burntime = 8, }) + + +-- integration with bonemeal +if minetest.get_modpath("bonemeal") then + bonemeal:add_sapling({ + {"maple:maple_sapling", maple.grow_sapling, "soil"}, + }) +end \ No newline at end of file -- cgit v1.2.3