summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-04-30 19:04:57 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-04-30 19:04:57 +0300
commitd16f5b00fe7ff7ff938dedc83f4f1cd8286cbd7d (patch)
tree70552e0555c87161b906c110cb8a269b6ab09c3c
parent001fe95fca1e3047f21d7418fa7e8456f840a25a (diff)
bonemeal integration
-rw-r--r--README.md4
-rw-r--r--depends.txt1
-rw-r--r--init.lua8
3 files changed, 12 insertions, 1 deletions
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