using System.Collections.Generic; using MinecraftClient.Inventory.ItemPalettes; using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_2; public class DamageResistantComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) { public string Types { get; set; } = null!; public override void Parse(Queue data) { Types = DataTypes.ReadNextString(data); } public override Queue Serialize() { var data = new List(); data.AddRange(DataTypes.GetString(Types)); return new Queue(data); } }