summaryrefslogtreecommitdiff
path: root/api.txt
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-05-07 09:18:25 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-05-07 09:18:25 +0100
commitdd422b609164b338c4a68166b78a1d7d2d9e5250 (patch)
treecf237d8f11c6cf6ee413e66af0da6a8046fce86c /api.txt
parentd1c962837d098866fd0eaffc030c39e57f525e08 (diff)
add_deco() now adds to item list, set_deco() replaces item list (thanks h-v-smacker)
Diffstat (limited to 'api.txt')
-rw-r--r--api.txt31
1 files changed, 25 insertions, 6 deletions
diff --git a/api.txt b/api.txt
index bc450fd..47b631d 100644
--- a/api.txt
+++ b/api.txt
@@ -14,7 +14,9 @@ Function Usage
Adding Crops
------------
-bonemeal:add_crop({ nodename_start, growing_steps, seed_name })
+bonemeal:add_crop({
+ { nodename_start, growing_steps, seed_name }
+})
This command is used to add new crops for bonemeal to work on.
@@ -29,7 +31,9 @@ bonemeal:add_crop({
Adding Saplings
---------------
-bonemeal:add_sapling({ sapling_node, function, soil_type[sand, dirt, nodename] })
+bonemeal:add_sapling({
+ { sapling_node, function, soil_type[sand, dirt, nodename] }
+})
This command will add new saplings for bonemeal to grow on sand, soil or a
specified node type.
@@ -43,15 +47,30 @@ bonemeal:add_sapling({
Adding Dirt Decoration
----------------------
-bonemeal:add_deco({ dirt_node, {grass_node_list}, {decor_node_list} })
+bonemeal:add_deco({
+ { dirt_node, {grass_node_list}, {decor_node_list} }
+})
This command will add grass and decoration to specific dirt types, use "" to
-add an empty node.
+add an empty node. If some decorations have been already defined for this dirt type, new
+will be added to the respective list. All empty ("") entries will be added regardless,
+which allows to decrease the frequency of decoration emergence, if needed.
e.g.
-bonemeal:add_deco({"default:dirt_with_dry_grass", {"default:dry_grass_1", ""},
- {"flowers:rose", "flowers:viola"} })
+bonemeal:add_deco({
+ {"default:dirt_with_dry_grass", {"default:dry_grass_1", ""},
+ {"flowers:rose", "flowers:viola"} }
+})
+
+Thus, add_deco() always adds (to) a definition, and never overrides. To discard an existing
+definiton in favor of the new one, use
+
+bonemeal:set_deco({
+ { dirt_node, {grass_node_list}, {decor_node_list} }
+})
+
+This command will set decoration for a given dirt type, fully replacing any existing definition.
Global ON_USE Function