From 16637f7ebaa4f401677d7f6653a9fab8585030b6 Mon Sep 17 00:00:00 2001 From: Anon Date: Thu, 11 Jun 2026 16:20:42 +0200 Subject: [PATCH] Fix custom model data decoding for 1.21.4 --- .../Registries/StructuredComponentsRegistry1212.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1212.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1212.cs index 79c9475e..d6f519bb 100644 --- a/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1212.cs +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1212.cs @@ -25,7 +25,10 @@ public class StructuredComponentsRegistry1212 : StructuredComponentRegistry RegisterComponent(11, "minecraft:can_place_on"); RegisterComponent(12, "minecraft:can_break"); RegisterComponent(13, "minecraft:attribute_modifiers"); - RegisterComponent(14, "minecraft:custom_model_data"); + if (dataTypes.ProtocolVersion >= Protocol18Handler.MC_1_21_4_Version) + RegisterComponent(14, "minecraft:custom_model_data"); + else + RegisterComponent(14, "minecraft:custom_model_data"); RegisterComponent(15, "minecraft:hide_additional_tooltip"); RegisterComponent(16, "minecraft:hide_tooltip"); RegisterComponent(17, "minecraft:repair_cost");