diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-11 21:20:10 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-11 21:20:10 -0500 |
commit | 978e88bda5b6d1f02187f700630b1a80a46fed07 (patch) | |
tree | dcb6ef3969997ee4631977870b927485abbfd956 | |
parent | 70b1f9fbc9f799feec4f34355874842b37122651 (diff) | |
download | unifieddyes-978e88bda5b6d1f02187f700630b1a80a46fed07.tar unifieddyes-978e88bda5b6d1f02187f700630b1a80a46fed07.tar.gz unifieddyes-978e88bda5b6d1f02187f700630b1a80a46fed07.tar.bz2 unifieddyes-978e88bda5b6d1f02187f700630b1a80a46fed07.tar.xz unifieddyes-978e88bda5b6d1f02187f700630b1a80a46fed07.zip |
don't crash if the dye target is an unknown node :P
-rw-r--r-- | init.lua | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -505,6 +505,8 @@ function unifieddyes.on_use(itemstack, player, pointed_thing) local nodedef = minetest.registered_nodes[node.name] local playername = player:get_player_name() + if not nodedef then return end -- target was an unknown node, just bail out + -- if the node has an on_punch defined, bail out and call that instead, unless "sneak" is pressed. if not player:get_player_control().sneak then local onpunch = nodedef.on_punch(pos, node, player, pointed_thing) |