1
0
mirror of https://codeberg.org/tenplus1/bonemeal.git synced 2025-07-16 23:30:21 +02:00

add ignore_light flag to crop and sapling growth, tidy code

This commit is contained in:
tenplus1
2022-07-01 11:20:06 +01:00
parent 996094dd5c
commit 1a1c49ba06
3 changed files with 52 additions and 46 deletions

View File

@ -15,7 +15,7 @@ Adding Crops
------------
bonemeal:add_crop({
{ nodename_start, growing_steps, seed_name }
{ nodename_start, growing_steps, seed_name, ignore_light }
})
This command is used to add new crops for bonemeal to work on.
@ -25,6 +25,7 @@ e.g.
bonemeal:add_crop({
{"farming:cotton_", 8, "farming:seed_cotton"},
{"farming:wheat_", 8, "farming:seed_wheat"},
{"mymod:dark_wheat_", 8, "mymod:dark_wheat_seed", true}, -- can grow in darkness
})
@ -32,7 +33,7 @@ Adding Saplings
---------------
bonemeal:add_sapling({
{ sapling_node, function, soil_type[sand, dirt, nodename] }
{ sapling_node, function, soil_type["sand", "dirt", nodename, "group:"], ignore_light }
})
This command will add new saplings for bonemeal to grow on sand, soil or a
@ -41,6 +42,7 @@ specified node type.
bonemeal:add_sapling({
{"ethereal:palm_sapling", ethereal.grow_palm_tree, "soil"},
{"ethereal:palm_sapling", ethereal.grow_palm_tree, "sand"},
{"mymod:dark_tree", mymod.dark_tree, "group:soil", true}, -- can grow in darkness
})