Compare the warden's animations and emissive layers with vanilla

The entity model harness now sets the warden's render state (tendril and
heart animation, the roar, sniff, emerge, dig, attack and sonic boom
animation states) and bakes its four emissive layers (tendrils, heart,
bioluminescent skin, pulsating spots) over WardenModel: 430 cases match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-12 17:06:36 +02:00
parent 2f232d955c
commit 000e676b57
3 changed files with 38 additions and 8 deletions
@@ -173,6 +173,23 @@ 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::Warden => {
use horizon_client::mobs::warden;
mob.anim.v[warden::TENDRIL] = num("tendrilAnimation") * 10.0;
mob.anim.vo[warden::TENDRIL] = num("tendrilAnimation") * 10.0;
mob.anim.v[warden::HEART] = num("heartAnimation") * 10.0;
mob.anim.vo[warden::HEART] = num("heartAnimation") * 10.0;
for (i, k) in [
(warden::ROAR, "roarAnimationState"),
(warden::SNIFF, "sniffAnimationState"),
(warden::EMERGE, "emergeAnimationState"),
(warden::DIGGING, "diggingAnimationState"),
(warden::ATTACK, "attackAnimationState"),
(warden::SONIC_BOOM, "sonicBoomAnimationState"),
] {
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());
}
@@ -222,6 +239,11 @@ fn main() -> horizon_client::Result<()> {
|| d.model == base
|| d.model.trim_end_matches("#main") == base.trim_end_matches("#main")
|| norm(d.model) == base
// The warden's emissive layers are its model over other parts.
|| (["#tendrils", "#heart", "#bioluminescent", "#pulsating_spots"]
.iter()
.any(|s| layer.ends_with(s))
&& d.model == format!("{}#main", layer.split('#').next().unwrap_or_default()))
}) else {
out.push_str(&format!("{}\n", json!({"skip": "no species"})));
continue;
+8 -8
View File
@@ -39,15 +39,15 @@ pub const DARKNESS_DURATION: i32 = 260;
pub const DARKNESS_REAPPLY: i32 = 200;
// AnimState keyframe slots.
const ROAR: usize = 0;
const SNIFF: usize = 1;
const EMERGE: usize = 2;
const DIGGING: usize = 3;
const ATTACK: usize = 4;
const SONIC_BOOM: usize = 5;
pub const ROAR: usize = 0;
pub const SNIFF: usize = 1;
pub const EMERGE: usize = 2;
pub const DIGGING: usize = 3;
pub const ATTACK: usize = 4;
pub const SONIC_BOOM: usize = 5;
// AnimState values: tendril and heart animation (ticks, 10 at the start).
const TENDRIL: usize = 0;
const HEART: usize = 1;
pub const TENDRIL: usize = 0;
pub const HEART: usize = 1;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum Pose {
+8
View File
@@ -54,6 +54,9 @@ EXTRAS = [
('minecraft:skeleton_horse_baby#main', 'BabyHorseModel'), ('minecraft:zombie_horse_baby#main', 'BabyHorseModel'),
('minecraft:cave_spider#main', 'SpiderModel'),
('minecraft:stray#main', 'SkeletonModel'),
# The warden's emissive layers: its model over each layer's own parts.
('minecraft:warden#tendrils', 'WardenModel'), ('minecraft:warden#heart', 'WardenModel'),
('minecraft:warden#bioluminescent', 'WardenModel'), ('minecraft:warden#pulsating_spots', 'WardenModel'),
]
# 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|'
@@ -189,6 +192,11 @@ SPECIES = {
{'tongueAnimationState': 3}, {'swimIdleAnimationState': 2, 'isSwimming': T}],
'rabbit': [{'hopAnimationState': 2}, {'idleHeadTiltAnimationState': 1}],
'fox': FOX,
'warden': [{'tendrilAnimation': 0.7}, {'tendrilAnimation': 1.0, 'heartAnimation': 0.4}, {'heartAnimation': 1.0}]
+ [{state: start} for state in ('roarAnimationState', 'sniffAnimationState', 'emergeAnimationState',
'diggingAnimationState', 'attackAnimationState', 'sonicBoomAnimationState')
for start in (50, 20, 100)]
+ [{'attackAnimationState': 50, 'tendrilAnimation': 0.3, 'roarAnimationState': 40}],
}