mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 18:20:20 +01:00
mob arrows only affect player/node/mobs redo mob
This commit is contained in:
parent
2b39c6f0fa
commit
3965b237f1
16
api.lua
16
api.lua
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
-- Mobs Api (5th July 2017)
|
-- Mobs Api (7th July 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
mobs.version = "20170705"
|
mobs.version = "20170707"
|
||||||
|
|
||||||
|
|
||||||
-- Intllib
|
-- Intllib
|
||||||
@ -3045,16 +3045,12 @@ function mobs:register_arrow(name, def)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local entity = player:get_luaentity()
|
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 tostring(player) ~= self.owner_id
|
||||||
and entity ~= self.object:get_luaentity().name
|
and entity.name ~= self.object:get_luaentity().name
|
||||||
and entity ~= "__builtin:item"
|
and entity._cmi_is_mob == true then
|
||||||
and entity ~= "__builtin:falling_node"
|
|
||||||
and entity ~= "gauges:hp_bar"
|
|
||||||
and entity ~= "signs:text"
|
|
||||||
and entity ~= "itemframes:item" then
|
|
||||||
|
|
||||||
self.hit_mob(self, player)
|
self.hit_mob(self, player)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user