From 0f581c669eb133d5ab98dc422cff2dbb88690532 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 27 Oct 2026 07:01:41 +0100 Subject: [PATCH] Send the axolotl's variant beside its own arm #2533 gives the axolotl an arm for DATA_PLAYING_DEAD: a second axolotl pattern here would be unreachable, so the variant goes before the match. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/lan.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/horizon-client/src/game/lan.rs b/crates/horizon-client/src/game/lan.rs index 4b11bceae..0201936b0 100644 --- a/crates/horizon-client/src/game/lan.rs +++ b/crates/horizon-client/src/game/lan.rs @@ -221,6 +221,11 @@ fn mob_meta( } let e = &m.extra; let id = |registry: &str, name: &str| hub.registry_id(registry, &format!("minecraft:{name}")); + // Axolotl.DATA_VARIANT (after AgeableMob's two), outside the match so the + // axolotl's own arm keeps its other entries. + if kind == "minecraft:axolotl" && e.variant != 0 { + meta.push((18, serializer::INT, Value::Int(i32::from(e.variant)))); + } match kind { "minecraft:guardian" | "minecraft:elder_guardian" => { // Guardian.DATA_ID_MOVING and DATA_ID_ATTACK_TARGET. @@ -390,10 +395,10 @@ fn mob_meta( meta.push((index, serializer, Value::Id(v))); } } - // Axolotl.DATA_VARIANT and Rabbit.DATA_TYPE_ID (after AgeableMob's - // two), Parrot.DATA_VARIANT_ID (after TamableAnimal's two and its - // flags and owner). The fox's type goes with its flags (#2538). - "minecraft:axolotl" | "minecraft:rabbit" | "minecraft:parrot" => { + // Rabbit.DATA_TYPE_ID (after AgeableMob's two) and + // Parrot.DATA_VARIANT_ID (after TamableAnimal's two and its flags and + // owner). The fox's type goes with its flags (#2538). + "minecraft:rabbit" | "minecraft:parrot" => { let index = if kind == "minecraft:parrot" { 20 } else { 18 }; if e.variant != 0 { meta.push((index, serializer::INT, Value::Int(i32::from(e.variant))));