diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 5f7b07a36..e7988f557 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -150,9 +150,9 @@ function mob_class:mob_activate(staticdata, def, dtime) local colbox = self.base_colbox local selbox = self.base_selbox - if self.gotten == true and def.gotten_texture then textures = def.gotten_texture end - if self.gotten == true and def.gotten_mesh then mesh = def.gotten_mesh end - if self.child == true then + if self.gotten and def.gotten_texture then textures = def.gotten_texture end + if self.gotten and def.gotten_mesh then mesh = def.gotten_mesh end + if self.child then vis_size = { x = self.base_size.x * .5, y = self.base_size.y * .5 } if def.child_texture then textures = def.child_texture[1] end diff --git a/mods/ENTITIES/mcl_mobs/breeding.lua b/mods/ENTITIES/mcl_mobs/breeding.lua index 426353b5a..73d956b9b 100644 --- a/mods/ENTITIES/mcl_mobs/breeding.lua +++ b/mods/ENTITIES/mcl_mobs/breeding.lua @@ -63,7 +63,7 @@ function mob_class:feed_tame(clicker, feed_count, breed, tame, notake) -- make children grow quicker - if not consume_food and self.child == true then + if not consume_food and self.child then consume_food = true -- deduct 10% of the time to adulthood self.hornytimer = self.hornytimer + ((CHILD_GROW_TIME - self.hornytimer) * 0.1) @@ -158,7 +158,7 @@ function mob_class:check_breeding() --mcl_log("In breed function") -- child takes a long time before growing into adult - if self.child == true then + if self.child then -- When a child, hornytimer is used to count age until adulthood self.hornytimer = self.hornytimer + 1 diff --git a/mods/ENTITIES/mcl_mobs/movement.lua b/mods/ENTITIES/mcl_mobs/movement.lua index e30c010d2..c62602d3b 100644 --- a/mods/ENTITIES/mcl_mobs/movement.lua +++ b/mods/ENTITIES/mcl_mobs/movement.lua @@ -452,7 +452,7 @@ end function mob_class:replace_node(pos) if not self.replace_rate or not self.replace_what - or self.child == true + or self.child or self.object:get_velocity().y ~= 0 or random(1, self.replace_rate) > 1 then return