Fixed shulker crashing on 26.1 (Structured Components)

This commit is contained in:
Anon 2026-05-07 19:57:23 +02:00
parent ba04636d06
commit d55fd75520
7 changed files with 205 additions and 13 deletions

View file

@ -4,6 +4,8 @@ using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_20_6;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_2;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_8;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_9;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_11;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._26_1;
using MinecraftClient.Protocol.Handlers.StructuredComponents.Core;
@ -31,7 +33,7 @@ public class StructuredComponentsRegistry261 : StructuredComponentRegistry
RegisterComponent<EnchantmentsComponent1215>(13, "minecraft:enchantments");
RegisterComponent<CanPlaceOnComponent1215>(14, "minecraft:can_place_on");
RegisterComponent<CanBreakComponent1215>(15, "minecraft:can_break");
RegisterComponent<AttributeModifiersComponent>(16, "minecraft:attribute_modifiers");
RegisterComponent<AttributeModifiersComponent1218>(16, "minecraft:attribute_modifiers");
RegisterComponent<CustomModelDataComponent>(17, "minecraft:custom_model_data");
RegisterComponent<TooltipDisplayComponent>(18, "minecraft:tooltip_display");
RegisterComponent<RepairCostComponent>(19, "minecraft:repair_cost");
@ -40,14 +42,14 @@ public class StructuredComponentsRegistry261 : StructuredComponentRegistry
RegisterComponent<IntangibleProjectileComponent>(22, "minecraft:intangible_projectile");
RegisterComponent<FoodComponent1212>(23, "minecraft:food");
RegisterComponent<ConsumableComponent>(24, "minecraft:consumable");
RegisterComponent<UseRemainderComponent>(25, "minecraft:use_remainder");
RegisterComponent<UseRemainderComponent261>(25, "minecraft:use_remainder");
RegisterComponent<UseCooldownComponent>(26, "minecraft:use_cooldown");
RegisterComponent<HolderSetComponent261>(27, "minecraft:damage_resistant");
RegisterComponent<ToolComponent>(28, "minecraft:tool");
RegisterComponent<ToolComponent1215>(28, "minecraft:tool");
RegisterComponent<WeaponComponent>(29, "minecraft:weapon");
RegisterComponent<AttackRangeComponent>(30, "minecraft:attack_range");
RegisterComponent<EnchantableComponent>(31, "minecraft:enchantable");
RegisterComponent<EquippableComponent>(32, "minecraft:equippable");
RegisterComponent<EquippableComponent1218>(32, "minecraft:equippable");
RegisterComponent<RepairableComponent>(33, "minecraft:repairable");
RegisterComponent<GliderComponent>(34, "minecraft:glider");
RegisterComponent<TooltipStyleComponent>(35, "minecraft:tooltip_style");
@ -64,24 +66,24 @@ public class StructuredComponentsRegistry261 : StructuredComponentRegistry
RegisterComponent<MapIdComponent>(46, "minecraft:map_id");
RegisterComponent<MapDecorationsComponent>(47, "minecraft:map_decorations");
RegisterComponent<MapPostProcessingComponent>(48, "minecraft:map_post_processing");
RegisterComponent<ChargedProjectilesComponent>(49, "minecraft:charged_projectiles");
RegisterComponent<BundleContentsComponent>(50, "minecraft:bundle_contents");
RegisterComponent<PotionContentsComponent>(51, "minecraft:potion_contents");
RegisterComponent<ItemStackTemplateListComponent261>(49, "minecraft:charged_projectiles");
RegisterComponent<ItemStackTemplateListComponent261>(50, "minecraft:bundle_contents");
RegisterComponent<PotionContentsComponent1212>(51, "minecraft:potion_contents");
RegisterComponent<PotionDurationScaleComponent>(52, "minecraft:potion_duration_scale");
RegisterComponent<SuspiciousStewEffectsComponent>(53, "minecraft:suspicious_stew_effects");
RegisterComponent<WritableBlookContentComponent>(54, "minecraft:writable_book_content");
RegisterComponent<WrittenBlookContentComponent>(55, "minecraft:written_book_content");
RegisterComponent<TrimComponent1215>(56, "minecraft:trim");
RegisterComponent<DebugStickStateComponent>(57, "minecraft:debug_stick_state");
RegisterComponent<EntityDataComponent>(58, "minecraft:entity_data");
RegisterComponent<TypedEntityDataComponent261>(58, "minecraft:entity_data");
RegisterComponent<BucketEntityDataComponent>(59, "minecraft:bucket_entity_data");
RegisterComponent<BlockEntityDataComponent>(60, "minecraft:block_entity_data");
RegisterComponent<BlockEntityDataComponent261>(60, "minecraft:block_entity_data");
RegisterComponent<InstrumentComponent261>(61, "minecraft:instrument");
RegisterComponent<ProvidesTrimMaterialComponent261>(62, "minecraft:provides_trim_material");
RegisterComponent<OmniousBottleAmplifierComponent>(63, "minecraft:ominous_bottle_amplifier");
RegisterComponent<JukeBoxPlayableComponent>(64, "minecraft:jukebox_playable");
RegisterComponent<JukeBoxPlayableComponent1215>(64, "minecraft:jukebox_playable");
RegisterComponent<HolderSetComponent261>(65, "minecraft:provides_banner_patterns");
RegisterComponent<RecipesComponent>(66, "minecraft:recipes");
RegisterComponent<NbtTagComponent261>(66, "minecraft:recipes");
RegisterComponent<LodestoneTrackerComponent>(67, "minecraft:lodestone_tracker");
RegisterComponent<FireworkExplosionComponent>(68, "minecraft:firework_explosion");
RegisterComponent<FireworksComponent>(69, "minecraft:fireworks");
@ -90,9 +92,9 @@ public class StructuredComponentsRegistry261 : StructuredComponentRegistry
RegisterComponent<BannerPatternsComponent>(72, "minecraft:banner_patterns");
RegisterComponent<BaseColorComponent>(73, "minecraft:base_color");
RegisterComponent<PotDecorationsComponent>(74, "minecraft:pot_decorations");
RegisterComponent<ContainerComponent>(75, "minecraft:container");
RegisterComponent<ContainerComponent261>(75, "minecraft:container");
RegisterComponent<BlockStateComponent>(76, "minecraft:block_state");
RegisterComponent<BeesComponent>(77, "minecraft:bees");
RegisterComponent<BeesComponent1219>(77, "minecraft:bees");
RegisterComponent<LockComponent>(78, "minecraft:lock");
RegisterComponent<ContainerLootComponent>(79, "minecraft:container_loot");