using System.Collections.Generic; using MinecraftClient.Inventory.ItemPalettes; using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; public class PotionDurationScaleComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) { public float Scale { get; set; } public override void Parse(Queue data) { Scale = dataTypes.ReadNextFloat(data); } public override Queue Serialize() { var bytes = new List(); bytes.AddRange(DataTypes.GetFloat(Scale)); return new Queue(bytes); } }