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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user