From cba3f5bb6a47b7c6c54cfdea0118ddba182d660d Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:51:57 +0200 Subject: [PATCH] Compare the breeze's animations and its wind and eyes layers with vanilla The entity model harness now poses the breeze's six animation states and bakes BreezeWindLayer's and BreezeEyesLayer's models and the creaking's emissive eyes model (141 and 64 cases, no differences). Co-Authored-By: Claude Opus 5.5 --- .../horizon-client/examples/entity_anim_fixture.rs | 12 ++++++++++++ tools/test_entity_model_parity.py | 6 ++++++ 2 files changed, 18 insertions(+) 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)],