diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-21 07:48:04 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-21 07:48:04 -0500 |
commit | 97590a955859115dc323692de34ce70e6a91d265 (patch) | |
tree | 97dad928906fb11120ca767263ab226a53856ce8 | |
parent | cfe869ba0fbcb163bc354ca29ce7d9a6fb016009 (diff) | |
download | dreambuilder_modpack-97590a955859115dc323692de34ce70e6a91d265.tar dreambuilder_modpack-97590a955859115dc323692de34ce70e6a91d265.tar.gz dreambuilder_modpack-97590a955859115dc323692de34ce70e6a91d265.tar.bz2 dreambuilder_modpack-97590a955859115dc323692de34ce70e6a91d265.tar.xz dreambuilder_modpack-97590a955859115dc323692de34ce70e6a91d265.zip |
updated unified dyes
-rw-r--r-- | unifieddyes/init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua index 6b5ed13..76b849e 100644 --- a/unifieddyes/init.lua +++ b/unifieddyes/init.lua @@ -342,7 +342,12 @@ end function unifieddyes.on_use(itemstack, player, pointed_thing) - if not pointed_thing or pointed_thing.type == "nothing" then return end -- if "using" the dye on air + if pointed_thing and pointed_thing.type == "object" then + pointed_thing.ref:punch(player, 0, itemstack:get_tool_capabilities()) + return player:get_wielded_item() -- punch may modified the wielded item, load the new and return it + end + + if not (pointed_thing and pointed_thing.type == "node") then return end -- if "using" the dye not on a node local pos = minetest.get_pointed_thing_position(pointed_thing) local node = minetest.get_node(pos) |