diff --git a/crates/horizon-client/src/mobs/piglin.rs b/crates/horizon-client/src/mobs/piglin.rs index 2c92ecd0a..59c0a9344 100644 --- a/crates/horizon-client/src/mobs/piglin.rs +++ b/crates/horizon-client/src/mobs/piglin.rs @@ -269,7 +269,7 @@ pub fn ai_step(m: &mut Mob, w: &MobWorld, events: &mut Vec) { m.extra.counter2 = 0; } // PiglinSpecificSensor (every 20 ticks): the nearest repelling block. - if m.species() == Species::Piglin && m.alive() && m.age.wrapping_add(m.id) % 20 == 0 { + if m.species() == Species::Piglin && m.alive() && m.age.wrapping_add(m.id).is_multiple_of(20) { m.extra.repellent = find_repellent(m, w); } }