diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 00e025094..3c5236e87 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -1318,15 +1318,19 @@ impl Game<'_> { ); let simulation = self.settings.render_distance.min(8); let mut ticking = Vec::new(); + let facts = &self.res.facts; for (&(x, z), chunk) in &self.world.chunks { if (x - pcx).abs() > simulation || (z - pcz).abs() > simulation || !chunk.lit { continue; } + // LevelChunkSection.isRandomlyTicking: a randomly ticking block or + // fluid state (lava reports both through LiquidBlock). The palette + // stands in for vanilla's exact counts. let sections: Vec = chunk .sections .iter() .enumerate() - .filter(|(_, s)| !s.is_uniform(0)) + .filter(|(_, s)| s.blocks.maybe_has(|id| facts.get(BlockStateId(id)).random_ticks)) .map(|(i, _)| MIN_Y + i as i32 * 16) .collect(); ticking.push((x, z, sections)); diff --git a/docs/parity/blocks.md b/docs/parity/blocks.md index b9e88d06f..0ecd1db48 100644 --- a/docs/parity/blocks.md +++ b/docs/parity/blocks.md @@ -145,9 +145,9 @@ containers, weather-driven blocks. The library code lives in - Features placed from block behaviour draw from a copy of the level random. Their `next_world_*` draws and any draws in neighbour updates during placement do not reach the real stream. - - Client sections that hold any non-air block get random ticks, not only - sections with randomly ticking states. This advances the - `getBlockRandomPos` generator more often than vanilla does. + - The client picks randomly ticking sections from their palettes, so a + section whose palette still lists a ticking state no block uses any more + gets random ticks that vanilla's exact counts would skip. - **Explosion details.** Exposure uses full-collision blocks only. `getEntities` order is approximate. Experience orbs, falling blocks and arrows are not pushed.