Re-organise mob_step for better clarity

This commit is contained in:
ancientmarinerdev 2023-05-12 23:45:11 +01:00
parent f326fa620f
commit 952a90bfde

View file

@ -436,22 +436,23 @@ local function on_step_work (self, dtime)
self:do_jump() self:do_jump()
end end
self:check_aggro(dtime)
self:check_particlespawners(dtime)
if self.do_custom and self.do_custom(self, dtime) == false then return end
if mcl_util.check_dtime_timer(self, dtime, "onstep_occassional", 1) then if mcl_util.check_dtime_timer(self, dtime, "onstep_occassional", 1) then
self:check_breeding()
if player_in_active_range then if player_in_active_range then
self:check_item_pickup() self:check_item_pickup()
self:set_armor_texture() self:set_armor_texture()
self:step_opinion_sound(dtime) self:step_opinion_sound(dtime)
end end
self:check_breeding()
end end
self:check_aggro(dtime)
self:check_particlespawners(dtime)
if self.do_custom and self.do_custom(self, dtime) == false then return end
if self:do_states(dtime, player_in_active_range) then return end if self:do_states(dtime, player_in_active_range) then return end
if mobs_debug then self:update_tag() end if mobs_debug then self:update_tag() end