mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Wire up entity metadata palette
This commit is contained in:
parent
1a22002bde
commit
f4ad24746c
6 changed files with 225 additions and 337 deletions
|
|
@ -86,6 +86,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
readonly Protocol18Terrain pTerrain;
|
||||
readonly IMinecraftComHandler handler;
|
||||
readonly EntityPalette entityPalette;
|
||||
readonly EntityMetadataPalette entityMetadataPalette;
|
||||
readonly ItemPalette itemPalette;
|
||||
readonly PacketTypePalette packetPalette;
|
||||
readonly SocketWrapper socketWrapper;
|
||||
|
|
@ -179,6 +180,8 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
else
|
||||
entityPalette = new EntityPalette112();
|
||||
|
||||
entityMetadataPalette = EntityMetadataPalette.GetPalette(protocolVersion);
|
||||
|
||||
// Item palette
|
||||
if (protocolVersion > MC_1_19_4_Version && handler.GetInventoryEnabled())
|
||||
throw new NotImplementedException(Translations.exception_palette_item);
|
||||
|
|
@ -2132,8 +2135,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (handler.GetEntityHandlingEnabled())
|
||||
{
|
||||
int EntityID = dataTypes.ReadNextVarInt(packetData);
|
||||
Dictionary<int, object?> metadata = dataTypes.ReadNextMetadata(packetData, itemPalette);
|
||||
Dictionary<int, object?> metadata = dataTypes.ReadNextMetadata(packetData, itemPalette, entityMetadataPalette);
|
||||
|
||||
// Also make a palette for field? Will be a lot of work
|
||||
int healthField; // See https://wiki.vg/Entity_metadata#Living_Entity
|
||||
if (protocolVersion > MC_1_19_4_Version)
|
||||
throw new NotImplementedException(Translations.exception_palette_healthfield);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue