mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Generated from the 26.2 server data reports (registries.json / blocks.json): - ItemPalette262 (1537 items, 31 new; IDs shifted by early sulfur/cinnabar inserts) - Palette262 blocks (1196 blocks, 32366 states, 28 new) - EntityPalette262 (158 entities, new sulfur_cube) - StructuredComponentsRegistry262 with new sulfur_cube_content component at ID 78 (shifts IDs 78-109 up by one); wire format is one ItemStackTemplate - New ItemType/Material/EntityType enum entries for the sulfur and cinnabar families, MusicDiscBounce, SulfurSpike and SulfurCube Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
25 lines
989 B
C#
25 lines
989 B
C#
using System.Collections.Generic;
|
|
using MinecraftClient.Inventory;
|
|
using MinecraftClient.Inventory.ItemPalettes;
|
|
using MinecraftClient.Protocol.Handlers.StructuredComponents.Core;
|
|
|
|
namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._26_2;
|
|
|
|
public class SulfurCubeContentComponent262(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry)
|
|
: StructuredComponent(dataTypes, itemPalette, subComponentRegistry)
|
|
{
|
|
public Item? AbsorbedBlockItemStack { get; set; }
|
|
|
|
public override void Parse(Queue<byte> data)
|
|
{
|
|
AbsorbedBlockItemStack = DataTypes.ReadNextItemStackTemplate(data, ItemPalette);
|
|
}
|
|
|
|
public override Queue<byte> Serialize()
|
|
{
|
|
var data = new List<byte>();
|
|
if (AbsorbedBlockItemStack is not null && !AbsorbedBlockItemStack.IsEmpty)
|
|
data.AddRange(DataTypes.GetItemStackTemplate(AbsorbedBlockItemStack, ItemPalette));
|
|
return new Queue<byte>(data);
|
|
}
|
|
}
|