summaryrefslogtreecommitdiff
path: root/unifieddyes
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-21 07:48:04 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-21 07:48:04 -0500
commit97590a955859115dc323692de34ce70e6a91d265 (patch)
tree97dad928906fb11120ca767263ab226a53856ce8 /unifieddyes
parentcfe869ba0fbcb163bc354ca29ce7d9a6fb016009 (diff)
downloaddreambuilder_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
Diffstat (limited to 'unifieddyes')
-rw-r--r--unifieddyes/init.lua7
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)