Merge pull request #408 from Online5277/fix/sulfur-cube-inner-layer

🤖 Agent: merged by Ludovic's AI agent. CI parity passed on the head; combined with current main (and #680) locally: workspace clippy clean, horizon-client 826 + horizon-world tests pass, mob_ai/save_roundtrip/spawner PASS. Thanks @Online5277!
This commit is contained in:
Ludovic Marie
2026-10-17 19:30:36 +02:00
committed by GitHub
14 changed files with 433 additions and 36 deletions
+9 -3
View File
@@ -253,14 +253,20 @@ impl StateModels {
&self,
state: BlockStateId,
position: BlockPos,
) -> Result<Vec<(&Variant, &BakedModel)>> {
// Blocks use their position seed; contained/displayed blocks can supply one.
self.collect_seeded(state, position_seed(position))
}
pub fn collect_seeded(
&self,
state: BlockStateId,
seed: i64,
) -> Result<Vec<(&Variant, &BakedModel)>> {
let (choice, selected) = self
.states
.get(&state)
.ok_or("unbound gallery block state")?;
// These inspection blocks use Block's default position seed. Blocks with
// specialized model seeds (e.g. two-block structures) need their callbacks.
let mut random = LegacyRandom::new(position_seed(position));
let mut random = LegacyRandom::new(seed);
let mut variants = Vec::new();
self.choices[*choice].collect(selected, &mut random, &mut variants)?;
variants