diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-06-24 18:21:15 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-06-24 18:21:15 +0100 |
commit | 8924b056233e76169e7a4e235ce95c7666bf417c (patch) | |
tree | 1f81ef016aed49f44d3ed12d20099c55715f71d4 | |
parent | af8963ec0021dae5d6bd25dc4db2fdcce43334e4 (diff) |
no drops for killing child mobs, fix base level of environ check
-rw-r--r-- | api.lua | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1,9 +1,9 @@ --- Mobs Api (23rd June 2017) +-- Mobs Api (24th June 2017) mobs = {} mobs.mod = "redo" -mobs.version = "20170623" +mobs.version = "20170624" -- Intllib @@ -329,6 +329,9 @@ end -- drop items local item_drop = function(self, cooked) + -- no drops for child mobs + if self.child then return end + local obj, item, num local pos = self.object:getpos() @@ -566,8 +569,14 @@ local do_env_damage = function(self) if check_for_death(self, "light", {type = "light"}) then return end end + local y_level = self.collisionbox[2] + + if self.child then + y_level = self.collisionbox[2] * 0.5 + end + -- what is mob standing in? - pos.y = pos.y + self.collisionbox[2] + 0.25 -- foot level + pos.y = pos.y + y_level + 0.25 -- foot level self.standing_in = node_ok(pos, "air").name -- print ("standing in " .. self.standing_in) |