summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-07-07 20:07:06 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-07-07 20:07:06 +0100
commit3965b237f156c5aefa5f40fc8080dd72fe65119f (patch)
treeb076485bd4a119456885c08ebbc46ca62d9cad16
parent2b39c6f0fad4cfb6518fa962453bdc4bce04e1f4 (diff)
mob arrows only affect player/node/mobs redo mob
-rw-r--r--api.lua16
1 files changed, 6 insertions, 10 deletions
diff --git a/api.lua b/api.lua
index 3dd7d79..39adac6 100644
--- a/api.lua
+++ b/api.lua
@@ -1,9 +1,9 @@
--- Mobs Api (5th July 2017)
+-- Mobs Api (7th July 2017)
mobs = {}
mobs.mod = "redo"
-mobs.version = "20170705"
+mobs.version = "20170707"
-- Intllib
@@ -3045,16 +3045,12 @@ function mobs:register_arrow(name, def)
end
local entity = player:get_luaentity()
- and player:get_luaentity().name or ""
- if self.hit_mob
+ if entity
+ and self.hit_mob
and tostring(player) ~= self.owner_id
- and entity ~= self.object:get_luaentity().name
- and entity ~= "__builtin:item"
- and entity ~= "__builtin:falling_node"
- and entity ~= "gauges:hp_bar"
- and entity ~= "signs:text"
- and entity ~= "itemframes:item" then
+ and entity.name ~= self.object:get_luaentity().name
+ and entity._cmi_is_mob == true then
self.hit_mob(self, player)