Fixed stupid bug
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Fri, 24 Nov 2017 09:57:18 +0000 (10:57 +0100)
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Fri, 24 Nov 2017 09:57:18 +0000 (10:57 +0100)
init.lua

index 30af488..4f1a455 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -174,7 +174,7 @@ 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)
-              if obj.get_luaentity().on_rightclick then
+              if obj:get_luaentity().on_rightclick then
                  obj:get_luaentity():on_rightclick(fake_player)
               end
 --            minetest.chat_send_all("animal fed")