diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-04 11:13:23 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-04 11:13:23 +0100 |
commit | 27fe687f8a1fa8d12d321460dcc7f9dbe5de60b0 (patch) | |
tree | 0b455ef5662a022e891bc9ea37d5e0c0737a0ec3 | |
parent | 070f02126b2f9c714544ad8c343c08a8a0bf8720 (diff) |
fixed flying mobs getting stuck in stairs and plants
-rw-r--r-- | api.lua | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1,9 +1,9 @@ --- Mobs Api (21st September 2017) +-- Mobs Api (4th October 2017) mobs = {} mobs.mod = "redo" -mobs.version = "20170921" +mobs.version = "20171004" -- Intllib @@ -263,7 +263,8 @@ local flight_check = function(self, pos_w) if not def then return false end -- nil check if type(self.fly_in) == "string" - and (nod == self.fly_in or def.liquid_alternative_flowing ~= "") then + and nod == self.fly_in then +-- and (nod == self.fly_in or def.liquid_alternative_flowing ~= "") then return true @@ -271,13 +272,21 @@ local flight_check = function(self, pos_w) for _,fly_in in pairs(self.fly_in) do - if nod == fly_in or def.liquid_alternative_flowing ~= "" then + --if nod == fly_in or def.liquid_alternative_flowing ~= "" then + if nod == fly_in then return true end end end + -- this stops mobs getting stuck inside stairs and plantlike nodes + if def.drawtype ~= "airlike" + and def.drawtype ~= "liquid" + and def.drawtype ~= "flowingliquid" then + return true + end + return false end |