From 604025a53b910c11ca06083aa501cd207a4793f4 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:10:48 +0100 Subject: [PATCH] Leave the default (temperate) variants out of the pairing data Pig, cow, chicken, frog and zombie nautilus define DATA_VARIANT_ID as their registry's TEMPERATE, so vanilla's getNonDefaultValues leaves it out of the add packet; server_entities caught the extra entry. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/lan.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game/lan.rs b/crates/horizon-client/src/game/lan.rs index f50852db3..d2bedf19f 100644 --- a/crates/horizon-client/src/game/lan.rs +++ b/crates/horizon-client/src/game/lan.rs @@ -191,10 +191,18 @@ fn mob_variant_meta( "minecraft:zombie_nautilus_variant", ), }; + // Each registry's default (`define(DATA_VARIANT_ID, ... TEMPERATE)`) + // stays out of the pairing data, as other default values do. let name = horizon_client::mobs::finalize::variant_name(m.species(), e.variant); - if let Some(v) = id(registry, name.trim_start_matches("minecraft:")) { + let name = name.trim_start_matches("minecraft:"); + if let Some(v) = id(registry, name) + && name != "temperate" + { meta.push((index, serializer, Value::Id(v))); } + if let Some(v) = id(registry, "temperate") { + defaults.push((index, serializer, Value::Id(v))); + } } // Rabbit.DATA_TYPE_ID (after AgeableMob's two) and // Parrot.DATA_VARIANT_ID (after TamableAnimal's two and its flags and