summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-24 23:53:16 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-24 23:53:53 -0400
commitde5f73e976b494273999b4c7b7acca19d79a3b93 (patch)
tree50d25668294901b9a68b26ac13cfeebe4c5d59b2
parent0d00a7eae601ad554662a5302b00577628e8f816 (diff)
downloadunifieddyes-de5f73e976b494273999b4c7b7acca19d79a3b93.tar
unifieddyes-de5f73e976b494273999b4c7b7acca19d79a3b93.tar.gz
unifieddyes-de5f73e976b494273999b4c7b7acca19d79a3b93.tar.bz2
unifieddyes-de5f73e976b494273999b4c7b7acca19d79a3b93.tar.xz
unifieddyes-de5f73e976b494273999b4c7b7acca19d79a3b93.zip
clarify usage of make_colored_itemstack()
-rw-r--r--API.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/API.md b/API.md
index decf76d..63fab69 100644
--- a/API.md
+++ b/API.md
@@ -77,6 +77,10 @@ When given a `color` string (in the form of "dye:foo" or "unifieddyes:foo") and
This function, called in your node definition's on_construct, just sets the `palette = "ext"` metadata key for the node after it's been placed. This can then be read in an LBM to determine if this node needs to be converted from the old 89-color palette to the extended 256-color palette. Although it is good practice to call this for any node that uses the 256-color palette, it isn't actually necessary as long as the node has never used the 89-color palette, and won't be subjected to an LBM that changes its color.
+**`unifieddyes.make_colored_itemstack(itemstack, palette, color)`**
+
+Makes a colored itemstack out of the given `itemstack` and `color` (as a dye, e.g. "dye:dark_red_s50", setting the correct index per the `palette` field, which works as described above for `unifieddyes.getpaletteidx()`. Said itemstack is returned as a string suitable for use as the output field of a craft recipe, equal in size to the itemstack passed into the function (e.g. if you give it "mymod:colored_node 7", it'll return a stack of 7 colored items).
+
#### Tables
In addition to the above API calls, Unified Dyes provides several useful tables