summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-11-23 17:25:48 +0100
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-11-23 17:25:48 +0100
commit27a0185e69dfc3b8226dcf85328e4b43f6c22c80 (patch)
tree40db3bb84ba3510e9942c0b2e5c6e22e5acbe8ed
parentd4c049434df9ca5193679d0b94533be874150347 (diff)
downloadfeedlot-27a0185e69dfc3b8226dcf85328e4b43f6c22c80.zip
feedlot-27a0185e69dfc3b8226dcf85328e4b43f6c22c80.tar.gz
feedlot-27a0185e69dfc3b8226dcf85328e4b43f6c22c80.tar.bz2
Dirty bugfix
-rw-r--r--init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 877170c..30af488 100644
--- a/init.lua
+++ b/init.lua
@@ -174,7 +174,9 @@ minetest.register_abm({
for _,obj in ipairs(objs) do
if not obj:is_player() and obj:get_armor_groups().fleshy and obj:get_armor_groups().fleshy > 0 and is_mob(obj) then
-- obj:on_rightclick(fake_player)
- obj:get_luaentity():on_rightclick(fake_player)
+ if obj.get_luaentity().on_rightclick then
+ obj:get_luaentity():on_rightclick(fake_player)
+ end
-- minetest.chat_send_all("animal fed")
end
end