diff --git a/crates/horizon-client/examples/entity_anim_fixture.rs b/crates/horizon-client/examples/entity_anim_fixture.rs index 4864a680f..19fd3a7db 100644 --- a/crates/horizon-client/examples/entity_anim_fixture.rs +++ b/crates/horizon-client/examples/entity_anim_fixture.rs @@ -173,6 +173,15 @@ fn entity_state(mob: &mut Mob, species: Species, case: &Value) { mob.anim.states[i].started = case[k].as_f64().map(|v| v as f32); } } + Species::Breeze => { + // breeze::anim's state slots. + for (i, k) in ["idle", "shoot", "slide", "slideBack", "inhale", "longJump"] + .into_iter() + .enumerate() + { + mob.anim.states[i].started = case[k].as_f64().map(|v| v as f32); + } + } Species::Witch if flag("isHoldingItem") => { mob.extra.main_hand = Some("minecraft:potion".into()); } @@ -215,6 +224,9 @@ fn main() -> horizon_client::Result<()> { base = base.replace(cut, ""); } let base = base.replace("undead_horse#", "zombie_horse#"); + // The breeze's wind and eyes and the creaking's eyes are layers of + // the species' own model class. + let base = base.replace("#wind", "#main").replace("#eyes", "#main"); let base = base.trim_start_matches("cold_").trim_start_matches("warm_"); let Some(def) = species::ALL.iter().find(|d| { d.model == layer diff --git a/tools/test_entity_model_parity.py b/tools/test_entity_model_parity.py index 9f5d1090a..6369c1d69 100644 --- a/tools/test_entity_model_parity.py +++ b/tools/test_entity_model_parity.py @@ -54,6 +54,10 @@ EXTRAS = [ ('minecraft:skeleton_horse_baby#main', 'BabyHorseModel'), ('minecraft:zombie_horse_baby#main', 'BabyHorseModel'), ('minecraft:cave_spider#main', 'SpiderModel'), ('minecraft:stray#main', 'SkeletonModel'), + # BreezeWindLayer and BreezeEyesLayer bake their own layers into a BreezeModel; + # the creaking's emissive eyes layer is a CreakingModel. + ('minecraft:breeze#wind', 'BreezeModel'), ('minecraft:breeze#eyes', 'BreezeModel'), + ('minecraft:creaking#eyes', 'CreakingModel'), ] # Layers a renderer reuses for another entity under a different constant. SKIP_LAYERS = re.compile(r'(banner|bell|book|skull|head|chest|shulker_box|boat|cushion|conduit|leash|arrow|trident|' @@ -156,6 +160,8 @@ SPECIES = { 'skeleton': SKELETON, 'stray': SKELETON, 'wither_skeleton': SKELETON, 'bogged': SKELETON, 'piglin': PIGLIN, 'piglin_brute': PIGLIN, 'cat': FELINE, 'ocelot': FELINE, + 'breeze': [{'idle': 3}, {'shoot': 2}, {'slide': 4}, {'slideBack': 1}, {'inhale': 5}, {'longJump': 2}, + {'idle': 1, 'shoot': 6}, {'idle': 9, 'slideBack': 7, 'longJump': 3}, {'idle': 2, 'inhale': 0, 'slide': 8}], 'creaking': [{'canMove': F}, {'attackAnimationState': 2}, {'invulnerabilityAnimationState': 3}, {'deathAnimationState': 1}], 'evoker': ILLAGER, 'pillager': ILLAGER, 'vindicator': ILLAGER, 'illusioner': ILLAGER, 'sheep': [{'eatTick': t} for t in (2, 10, 36, 39)],